El error anterior ocurrió en el componente: en ConnectedRouter en ConnectedRouterWithContext en ConnectFunction en el proveedor Estoy atascado en un error que dice No se pudo encontrar el reductor de enrutador en el árbol de estado, debe estar montado en «enrutador»

Este es mi archivo store.js …..

import storage from 'redux-persist/es/storage'; import { apiMiddleware } from 'redux-api-middleware'; import { applyMiddleware, createStore } from 'redux'; import { createFilter } from 'redux-persist-transform-filter'; import { persistReducer, persistStore } from 'redux-persist'; import { routerMiddleware } from 'react-router-redux'; import rootReducer from './redux/reducers'; import { combineReducers } from 'redux-immutable'; import { connectRouter, RouterState } from 'connected-react-router/immutable'; export default (history) ={amp}gt; { const persistedFilter = createFilter( 'auth', ['access', 'refresh']); const reducer = persistReducer( { key: 'polls', storage: storage, whitelist: ['auth'], transforms: [persistedFilter] }, rootReducer) const store = createStore( reducer, {}, applyMiddleware( apiMiddleware, routerMiddleware(history)) ) persistStore(store) return store } 

Así es como mi index.js es

 const history = createHistory() const store = configureStore(history) ReactDOM.render(( {amp}lt;Provider store={store}{amp}gt; {amp}lt;ConnectedRouter history={history}{amp}gt; {amp}lt;Router{amp}gt; {amp}lt;Switch{amp}gt; {amp}lt;Route exact path="/login/" component={Login} /{amp}gt; {amp}lt;PrivateRoute path="/" component={App}/{amp}gt; {amp}lt;/Switch{amp}gt; {amp}lt;/Router{amp}gt; {amp}lt;/ConnectedRouter{amp}gt; {amp}lt;/Provider{amp}gt; ), document.getElementById('root'));