I am learning redux and came up with an example using a webservice that
returns data. Everything is working. However I configured the redux developer tools
below.
I got an error saying my store is assigned a value but never used and when I go into my dev tools, I am not able to see my state data. Am i doing something wrong?
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter as Router, Route } from 'react-router-dom';
import promise from 'redux-promise';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, compose } from 'redux';
import reducers from './reducers';
import ProductsIndex from './components/products_index';
const createStoreWithMiddleware = applyMiddleware(promise)(createStore);
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(
reducers,
composeEnhancers(applyMiddleware())
);
ReactDOM.render(
<Provider store={createStoreWithMiddleware(reducers)}>
<Router>
<div>
<Route path="/" component={ProductsIndex} />
</div>
</Router>
</Provider>
, document.querySelector('#root'));
Error: Line 14:7: 'store' is assigned a value but never used no-unused-vars