Skip to content

blenderskool/react-localstorage-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-localstorage-hooks

A collection of React hooks for reactively managing localStorage.


Installation

npm i react-localstorage-hooks

Documentation

Usage

  • Make sure your project is using React 16.18.0 or above.

  • Install the package using npm or yarn

    npm i react-localstorage-hooks
  • Import the hooks either using ES6 named imports:

    import { useLocalStorageState } from 'react-localstorage-hooks';

    or importing each hook directly from lib:

    import useLocalStorageState from 'react-localstorage-hooks/lib/useLocalStorageState/useLocalStorageState';

License

This package is licensed under MIT