1

As the title says. I added

// Create Store
const store = createStoreWithFirebase(
rootReducer,
initialState,
composeWithDevTools(reactReduxFirebase(firebase))
);

This works fine in a browser without the redux extension installed. IE safari, chrome incognito. The instant I try to run the site with the extension installed I get.

Error: You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.

Error of image

If I change

composeWithDevTools()

To

compose()

The application works fine.

How can I fix this?

Abdul Rauf
  • 5,798
  • 5
  • 50
  • 70
Chris Stayte
  • 23
  • 2
  • 7
  • 4
    Possible duplicate of ["Error: Error: Error: Error: You may not call store.getState() while the reducer is executing." ](https://stackoverflow.com/questions/51503198/error-error-error-error-you-may-not-call-store-getstate-while-the-reducer) – Abdul Rauf Nov 28 '18 at 05:04
  • Please show the code and/or state the errors. Please don't use links to images. The text is missing from the question. The text on the picture is too small for some people to read. The text on the image cannot be indexed by search engines for future visitors. – jww Nov 28 '18 at 06:24
  • It's a bug with redux dev tools, see the link that Abdul posted – Patrick Hund Nov 28 '18 at 06:39

1 Answers1

1

As user Victor Le commented at this other post: "Error: Error: Error: Error: You may not call store.getState() while the reducer is executing." 🤔

It's an issue with the new v2.16.0 release of redux-devtools-extension. Just disable it, don't use it or downgrade to v2.15.

The post above is really useful.

Best!

Charly
  • 63
  • 1
  • 7