October 2019
Intermediate to advanced
426 pages
11h 49m
English
For the other Hooks, which make use of the StateContext, we have to define another wrapper to provide the StateContext to the Hooks.
Let's now define the StateContextWrapper component with the following steps:
import React, { useReducer } from 'react'import { StateContext, ThemeContext } from '../contexts'import appReducer from '../reducers'
export function StateContextWrapper ({ children ...Read now
Unlock full access