Skip to content

Instantly share code, notes, and snippets.

@Jahans3
Created December 1, 2018 01:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jahans3/383f033315d5a628b2c87afc75711a2a to your computer and use it in GitHub Desktop.
Save Jahans3/383f033315d5a628b2c87afc75711a2a to your computer and use it in GitHub Desktop.
Final provider with hooks
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