Skip to content

Instantly share code, notes, and snippets.

Last active February 16, 2019 08:56
What would you like to do?
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}>
<Routes />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment