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
/** Redux Mini | |
Implementing a Redux-like global store with useContext and useReducer. Potentially useful in small-scale applications | |
where Redux is overkill. | |
(source: Next.js examples) | |
*/ | |
/** Create the store and reducer to dispatch actions to it*/ | |
import { useReducer, useContext, createContext } from 'react' |