Last active
January 1, 2021 22:51
-
-
Save negarjf/53f6b8a6dd03e8101090ac1572d9be60 to your computer and use it in GitHub Desktop.
UserProvider step 1
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, useReducer} from 'react'; | |
import initialState from "./initialState"; | |
import reducer from "./reducer"; | |
import useActions from "./useActions"; | |
export const UserContext = createContext(); | |
export const UserProvider = ({children}) => { | |
const value = {user: null}; | |
return ( | |
<UserContext.Provider value={value}> | |
{children} | |
</UserContext.Provider> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment