1.2.0 • Published 5 years ago

redux-persist-weapp-storage v1.2.0

Weekly downloads
15
License
ISC
Repository
-
Last release
5 years ago

redux-persist-weapp-storage

A simple redux-persist storage engine for wechat mini program (微信小程序) Also support wepy

install

npm i redux-persist-weapp-storage

usage

just use redux-persist-weapp-storage as persist config storage option

// configureStore.js
import { createStore } from 'redux'
import { persistStore, persistReducer } from 'redux-persist'
import storage from 'redux-persist-weapp-storage'

const rootPersistConfig = {
  key: 'root',
  storage
}

const persistedReducer = persistReducer(persistConfig, rootReducer)

export default () => {
  let store = createStore(persistedReducer)
  let persistor = persistStore(store)
  return { store, persistor }
}
1.2.0

5 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago