Last active
May 7, 2020 00:04
-
-
Save ryanbelke/70db6d12f9a33a7fb9347f71742697a4 to your computer and use it in GitHub Desktop.
create default AppContext state
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
| /* /context/AppContext.js */ | |
| import React from "react"; | |
| // create auth context with default value | |
| // set backup default for isAuthenticated if none is provided in Provider | |
| const AppContext = React.createContext({ isAuthenticated: false }); | |
| export default AppContext; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment