I have the following code in my configureStore.js file :
import {createStore, applyMiddleware} from 'redux';
import rootReducer from '../reducers/index';
import thunk from 'redux-thunk';
export default function configureStore(initialState){
return createStore(
rootReducer,
initialState,
applyMiddleware(thunk),
window.devToolsExtension ? window.devToolsExtension() : f => f
);
}
The code whera I use Provider and pass the store to provider is :
import 'babel-polyfill';
import React from 'react';
import {render} from 'react-dom';
import {Router, browserHistory} from 'react-router';
import routes from './routes';
import '../node_modules/bootstrap/dist/css/bootstrap.min.css';
import './assets/sass/main.scss';
import '../node_modules/font-awesome/css/font-awesome.css';
import {loadCourses} from './actions/courseActions';
import {loadAuthors} from './actions/authorActions';
import {Provider} from 'react-redux';
import configureStore from './store/configureStore';
const store = configureStore();
store.dispatch(loadCourses());
store.dispatch(loadAuthors());
render(
<Provider store={store}><Router history={browserHistory} routes={routes}/></Provider>, document.getElementById("app")
);
But when I run redux extension I see "No store found".
createStore takes only 3 arguments, the third is the enhancer. That said, it should be used like that:
import {createStore, applyMiddleware, compose} from 'redux';
import rootReducer from '../reducers/index';
import thunk from 'redux-thunk';
export default function configureStore(initialState){
return createStore(
rootReducer,
initialState,
compose(
applyMiddleware(thunk),
window.devToolsExtension ? window.devToolsExtension() : f => f
)
);
}
Note that I also imported compose from redux.
It worked. Great. Thanks.
I meet this too and has tried @zalmoxisus 's suggestion , but it doest not work!

Hey @falltodis,
Maybe you are using an older version of Redux. Passing enhancer as the 3rd parameter is supported only for redux@>=3.1.0. For older versions you should use it like so.
If not, please provide an example repo or jsfiddle to reproduce the problem.
The extension is meant to be used in the browser, so it could inject the script in web page. For React Native you need Remote Redux DevTools, which would send data to the extension.
Most helpful comment
createStoretakes only 3 arguments, the third is the enhancer. That said, it should be used like that:Note that I also imported
composefromredux.