Created
April 1, 2022 08:43
-
-
Save jide/97bf083b03f7229b8126a22ef94f4e64 to your computer and use it in GitHub Desktop.
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 { createOvermind } from 'overmind'; | |
import { | |
createStateHook, | |
createActionsHook, | |
createEffectsHook, | |
createReactionHook | |
} from 'overmind-react'; | |
import { state } from './state'; | |
import * as actions from './actions'; | |
import { gql } from './effects/gql'; | |
import { router } from './effects/router'; | |
import { auth } from './effects/auth'; | |
import { keyboard } from './effects/keyboard'; | |
import { history } from './effects/history'; | |
import { focus } from './effects/focus'; | |
import { polling } from './effects/polling'; | |
export const config = { | |
state, | |
actions, | |
effects: { | |
gql, | |
router, | |
auth, | |
keyboard, | |
history, | |
focus, | |
polling | |
} | |
}; | |
export const useAppState = createStateHook(); | |
export const useActions = createActionsHook(); | |
export const useEffects = createEffectsHook(); | |
export const useReaction = createReactionHook(); | |
export const overmind = createOvermind(config); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment