Last active
February 16, 2019 08:56
-
-
Save nightspirit/6952a9ffeada476e2d5dd19db114964e 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 { createContext, useReducer } from 'react' | |
import AppReducer from 'Reducers/AppReducer' | |
import { BrowserRouter } from 'react-router-dom' | |
import Routes from 'Routes' | |
export const AppReducerContext = createContext() | |
const initState = AppReducer() | |
export default function App () { | |
const appReducer = useReducer(AppReducer, initState) | |
return ( | |
<AppReducerContext.Provider value={appReducer}> | |
<BrowserRouter> | |
<Routes /> | |
</BrowserRouter> | |
</AppReducerContext.Provider> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment