Created
August 4, 2020 19:06
-
-
Save popeating/bac25b92c5860c9f0d935a038fc587c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { createContext } from 'react'; | |
const mainContext = createContext(); | |
export default mainContext; | |
//In App.js | |
return ( | |
<mainContext.Provider value={mainC}> //mainC will be defined in next step | |
//Resto of code | |
</mainContext.Provider> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment