use-reducer-with-local-storage
v1.1.2
Published
React hook that adds local storage support to the `useReducer` hook
Downloads
6
Readme
useReducerWithLocalStorage
React hook that adds local storage support to the useReducer
hook
Install
yarn add use-reducer-with-local-storage
Usage
const [state, dispatch] = useReducerWithLocalStorage({
initializerArg: emptyState,
key: 'REACT_APP_STATE',
reducer
});