state-storage
A localStorage api for state management in React
Installation
npm install state-storage --save
Usage
Find the example here.
API
set_plain(key, state)
Sets the current state with a key in Local Storage.
get_plain(key)
Returns the current state.
set_JSON(key, state)
Stores the JSON data.
get_JSON(key)
Parses and returns the state.
Tests
npm run test
Contributing
Add unit tests for any new or changed functionality
License
ISC