Skip to content

Instantly share code, notes, and snippets.

@Jahans3
Created December 1, 2018 01:35
Show Gist options
  • Save Jahans3/beaa9d7824f7c5de0c550597abf79392 to your computer and use it in GitHub Desktop.
Save Jahans3/beaa9d7824f7c5de0c550597abf79392 to your computer and use it in GitHub Desktop.
const StateContent = createContext();
export function useStore () {
const { state, dispatch } = useContext(StateContext);
return [state, dispatch];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment