1.1.2 • Published 5 years ago

redux-persist-buildfire-storage v1.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

redux-persist-buildfire-storage

redux-persist-buildfire-storage is using BuildFire file system componente to persist redux state, and allowing it to be reloaded from the file system even when tha app is closed.

To use it, follow the code example below:

// configureStore.js

import { createStore } from 'redux'
import { persistStore, persistReducer } from 'redux-persist'
import bf_storage from ''redux-persist-buildfire-storage'
import actionTypes from '../actionTypes.js'

import rootReducer from './reducers'
const storage = new bf_storage('myPersistFolder', actionTypes);

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

const persistedReducer = persistReducer(persistConfig, rootReducer)

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