redux-localstorage-filter
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/redux-localstorage-filter package

0.1.1 • Public • Published

redux-localstorage-filter

Storage enhancer to persist a subset of your state.

license npm version npm downloads

Installation

npm install --save redux-localstorage-filter

Usage

const storage = compose(
  filter('nested.key'),
)(adapter(localStorage));

For more information on using storage enhancers check out redux-localstorage

API

filter(paths)

type paths = Array<String> | String

A path is a string that points to the property key of your redux store that you would like to persist. In order to specify a nested key separate the keys that make up the full path with fullstops (.). Specify multiple paths by passing in an Array:

filter(['key', 'another.key']),

License

MIT

Package Sidebar

Install

npm i redux-localstorage-filter

Weekly Downloads

4,571

Version

0.1.1

License

MIT

Last publish

Collaborators

  • elgerlambert