Created
December 10, 2019 11:17
-
-
Save RishikeshVedpathak/116b78639b7dcc92230e7530e57650df to your computer and use it in GitHub Desktop.
How to create context for your application
This file contains hidden or 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 from "react"; | |
| const AppContext = React.createContext({}); | |
| export const ContextProvider = AppContext.Provider | |
| export const ContextConsumer = AppContext.Consumer | |
| export default AppContext |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment