1

Having some trouble getting Redux devtools to work. When I open up the redux tab in devtools, it says "No store found. Make sure to follow the instructions". I tried following the instructions under 1.1 Basic store, which did not work. I then tried 1.3 Use redux-devtools-extension package from npm, that didn't work either. Here's my index.js

import React from "react";
import ReactDOM from "react-dom";
import { Provider } from "react-redux";
import "./index.css";
import App from "./components/App";
import reportWebVitals from "./reportWebVitals";
import reducers from "./reducers";

import { createStore, applyMiddleware } from "redux";
import { composeWithDevTools } from "redux-devtools-extension";

const store = createStore(
  reducers,
  composeWithDevTools()
  // other store enhancers if any
);

ReactDOM.render(
  <React.StrictMode>
    <Provider store={store}>
      <App />
    </Provider>
  </React.StrictMode>,
  document.getElementById("root")
);

reportWebVitals();
user12457151
  • 853
  • 2
  • 12
  • 25

1 Answers1

0

try this:

const initialState = {};

const middleware = [thunk];



const store = createStore(
  rootReducer,
  initialState,
  composeWithDevTools(applyMiddleware(...middleware))
);
HMR
  • 37,593
  • 24
  • 91
  • 160
saurav
  • 129
  • 8