redux-cube-with-persist

    1.1.2 • Public • Published

    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() {
        // ...
      }
    }

    Install

    npm i redux-cube-with-persist

    DownloadsWeekly Downloads

    7

    Version

    1.1.2

    License

    MIT

    Unpacked Size

    11 kB

    Total Files

    8

    Last publish

    Collaborators

    • dexteryy