Created
December 1, 2018 01:59
-
-
Save Jahans3/383f033315d5a628b2c87afc75711a2a to your computer and use it in GitHub Desktop.
Final provider with hooks
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
export function StateProvider ({ state: initialState, reducers, middleware, children }) { | |
return ( | |
<StateContext.Provider value={useStateProvider({ initialState, reducers, middleware })}> | |
{children} | |
</StateContext.Provider> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment