Socket
Socket
Sign inDemoInstall

local-redux-storage

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    local-redux-storage

Simple, small and dependency free redux state to local storage on reduce layer.


Version published
Weekly downloads
6
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Local Redux Storage

NPM version Dependency Status devDependency Status

NPM

Simple, small and dependency free redux state to local storage on reduce layer.

Installation

npm i local-redux-storage

Usage

For all state.

import { createStore, combineReducers } from 'redux';
import storage from 'local-redux-storage';

const rootReducer = combineReducers({ ...reducers })

const store = createStore(storage(rootReducer))

For one reducer state.

import { createStore, combineReducers } from 'redux';
import storage from 'local-redux-storage';

const exampleReducer = (state = {}, action) => state

const reducer = storage(exampleReducer, 'exampleReducerKey')

const rootReducer = combineReducers({ 
    reducer,
    ...otherReducers 
})

const store = createStore(storage(rootReducer))

Example

Example project in example folder. Also live on https://local-redux-storage-example.netlify.app/.

License

ISC

Keywords

FAQs

Last updated on 17 Aug 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc