redux-local-storage
Advanced tools
Comparing version 1.0.0 to 1.1.0
{ | ||
"name": "redux-local-storage", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Redux middleware for accessing local storage", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -26,2 +26,17 @@ # redux-local-storage | ||
```javascript | ||
# install middleware | ||
import createLocalStorage from 'redux-local-storage' | ||
import thunkMiddleware from 'redux-thunk' | ||
import reducer from './reducer' | ||
const localStorageMiddleware = createLocalStorage() | ||
const createStoreWithMiddleware = applyMiddleware( | ||
thunkMiddleware, | ||
localStorageMiddleware | ||
)(createStore) | ||
const store = createStoreWithMiddleware(reducer) | ||
# action creator | ||
import { LOCAL_GET, LOCAL_SET, LOCAL_REMOVE } from 'redux-local-storage/action_types' | ||
@@ -54,1 +69,9 @@ | ||
``` | ||
[View example app](https://github.com/mahaplatform/redux-local-storage/tree/master/example) | ||
## Author & Credits | ||
redux-local-storage was originally written by [Greg Kops](https://github.com/mochini) and | ||
is based upon his work with [Think Topography](http://thinktopography.com) and | ||
[The Cornell Cooperative Extension of Tompkins County](http://ccetompkins.org) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
243826
76
0