1.1.2 • Published 5 years ago

redux-cube-with-persist v1.1.2

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

redux-cube-with-persist

< Back to Project WebCube

NPM Version

Nodei

redux-cube's pluggable module for redux-persist

npm install --save redux-cube-with-persist

NOTE: redux-cube-with-persist cannot be used with redux-cube-with-immutable

Get Started

// xxx/App.jsx
import { createApp } from 'redux-cube';
import withPersist from 'redux-cube-with-persist';
import localforage from 'localforage';
import withRouter from 'redux-cube-with-router';

@createApp(withPersist(withRouter({
  reducers: {
    // ...
  },
  // optional
  // https://github.com/rt2zz/redux-persist#storage-engines
  persistStorage: localforage,
  // optional
  // https://github.com/rt2zz/redux-persist/blob/master/docs/api.md#type-persistconfig
  persistKey = 'persistRoot',
  // optional
  // https://github.com/rt2zz/redux-persist/blob/master/docs/api.md#type-persistconfig
  persistConfig: {
    // ...
  },
  // optional
  // https://github.com/rt2zz/redux-persist-transform-immutable#usage-with-records
  persistImmutableConfig: {
    // ...
  },
  // ...
}))))
class SubApp extends PureComponent {
  render() {
    // ...
  }
}
1.1.2

5 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago