How to use the redux-persist/lib/persistStore function in redux-persist

To help you get started, we’ve selected a few redux-persist examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Amin52J / React-Redux-Enterprise / app / main.jsx View on Github external
/* eslint-disable no-unused-expressions */

import React from 'react';
import ReactDOM from 'react-dom';
import Provider from 'react-redux/lib/components/Provider';
import { injectGlobal } from 'styled-components';
import { PersistGate } from 'redux-persist/lib/integration/react';
import persistStore from 'redux-persist/lib/persistStore';
import { ConnectedRouter } from 'react-router-redux';
import App from '@containers/app/index';
import store, { history } from '@constants/store';
import styleReset from '@constants/styleReset';
import globalStyles from '@constants/globalStyles';

const persistor = persistStore(store);
injectGlobal`
  ${styleReset}
  ${globalStyles}
`;

ReactDOM.render(
  
    
      
        
      
    
  ,
  document.getElementById('app'),
);