1.0.8 • Published 7 years ago

redux-persist-restful-storage v1.0.8

Weekly downloads
4
License
ISC
Repository
github
Last release
7 years ago

Redux persist RESTful storage

use RESTful way to build a storage adaptor for redux-persist by implementing methods: setItem, getItem, removeItem and getAllKeys

install

npm install --save redux-persist-restful-storage

usage

import { AsyncRESTfulStorage } from 'redux-persist-restful-storage'
import { persistStore, autoRehydrate } from 'redux-persist'
const store = createStore(reducer, undefined, autoRehydrate())
persistStore(store, { storage: new AsyncRESTfulStorage() })

example

You need to build your own RESTful API server to communicate with redux-persist.

/example present an example with nodeJS. Use express to create a HTTP server and node-localstorage to save/get data.

To run with

npm init
npm install body-parser express node-localstorage
node nodeApiExample.js
1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.4

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago