title: Using PersistGate on my React App doesn't render
body: <p>I implemented a PersistGate in my application but now my App is not rendering. If I remove the PersistGate then it works fine.</p>
  <p>store.js</p>
  <pre><code>import { createStore, applyMiddleware } from 'redux'
  import rootReducer from './root-reducer'
  import { persistStore } from 'redux-persist'
  import logger from 'redux-logger'
  
  const middleWares = []
  
  if(process.env.NODE_ENV === 'development')
      middleWares.push(logger)
  
  export const store = createStore(rootReducer, undefined, applyMiddleware(...middleWares))
  
  export const persistor = persistStore(store)
  </code></pre>
  <p>index.js</p>
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import './index.css';
  import App from './App';
  import reportWebVitals from './reportWebVitals';
  import { BrowserRouter } from 'react-router-dom'
  import { Provider } from 'react-redux'
  import { store, persistor } from './redux/store'
  import { PersistGate } from 'redux-persist/integration/react'
  
  ReactDOM.render(
    &lt;React.StrictMode&gt;
      &lt;Provider store={store}&gt;
        &lt;BrowserRouter&gt;
          &lt;PersistGate persistor={persistor}&gt;
            &lt;App /&gt; 
          &lt;/PersistGate&gt;
        &lt;/BrowserRouter&gt;
      &lt;/Provider&gt;
    &lt;/React.StrictMode&gt;,
    document.getElementById('root')
  );
  </code></pre>
  <p>And my App.js</p>
  <pre><code>import { GlobalStyle } from './global.styles'
  import { Switch, Route } from 'react-router-dom'
  import LoginPage from './pages/login/login.component'
  import MainPage from './pages/main/main.component'
  import { connect } from 'react-redux'
  import { createStructuredSelector } from 'reselect'
  import { selectCurrentUser } from './redux/user/user.selector'
  
  const App = ({ currentUser }) =&gt; {
    console.log(currentUser)
    return (
      &lt;div&gt;
        &lt;GlobalStyle /&gt;
        &lt;Switch&gt;
          &lt;Route exact path='/' component={ LoginPage } /&gt;
          &lt;Route exact path='/main' component={ MainPage } /&gt;
        &lt;/Switch&gt;
      &lt;/div&gt;
    )
  }
  
  const mapStateToProps = createStructuredSelector({
    currentUser: selectCurrentUser
  })
  
  export default connect(mapStateToProps)(App)
  </code></pre>
  <p>I'm not sure if the problem is the order in which I put the PersistorGate tag in my <code>index.js</code>. I did try to play around with the order but I had no success unless I removed the PersistorGate from it.</p>