Skip to content

About

React hook that adds local storage support to the `useReducer` hook

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

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
});

Resources

Notes

  • Special thanks to Matthew Brooks that was kind enough to review the original Gist and to propose new features.

About

React hook that adds local storage support to the `useReducer` hook

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages