Update Troubleshooting.md (#1237)

* Update Troubleshooting.md

Added documentation for another possible cause of "### It shows only the `@@INIT` action or moving back and forth doesn't update the state".

* Added missing link label

Co-authored-by: Nathan Bierema <nbierema@gmail.com>
This commit is contained in:
eghernqvist 2022-10-29 22:04:43 +02:00 committed by GitHub
parent 61d0aca1fc
commit cc5d7b7ffd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,8 @@ If you develop on your local filesystem, make sure to allow Redux DevTools acces
Most likely you mutate the state. Check it by [adding `redux-immutable-state-invariant` middleware](https://github.com/zalmoxisus/redux-devtools-extension/blob/master/examples/counter/store/configureStore.js#L3).
Another cause could be that you are creating multiple stores, which means that the devtools get attached to one but the application uses another. See [https://github.com/reduxjs/redux-toolkit/issues/2753](this issue).
### @@INIT or REPLACE action resets the state of the app or last actions RE-APPLIED
`@@redux/REPLACE` (or `@@INIT`) is used internally when the application is hot reloaded. When you use `store.replaceReducer` the effect will be the same as for hot-reloading, where the extension is recomputing all the history again. To avoid that set [`shouldHotReload`](/docs/API/Arguments.md#shouldhotreload) parameter to `false`.