You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been noticing that replacing the reducer on the store dispatch an @@INIT action.
When combined with redux-devtools or redux-devtools-extension, it seems to be replaying all actions since beginning each time you replace the reducer.
Fast recipe to reproduce :
git clone https://github.com/mxstbr/react-boilerplate.git && cd react-boilerplate && npm install
Add console.log('Reducer called', action) at the start of appReducer in ~/app/containers/App/reducer.js
Open console, go to http://localhost:3000, move back and forth between the Features and the Home page, and watch the log output
Mind that the replay will only occur when going to the Home page and not when going to the Features page. This is due to the fact that the Features page is not injecting a reducer, and so not replacing the store's reducer, while the Home page is.
The text was updated successfully, but these errors were encountered:
I'm digging a little bit into the redux-devtools-instrument code right now.
It seems like the actions only gets re-reduced. It isn't a concern then, though it is a little bit weird as they only get re-reduced in the tool.
I've been noticing that replacing the reducer on the store dispatch an
@@INIT
action.When combined with
redux-devtools
orredux-devtools-extension
, it seems to be replaying all actions since beginning each time you replace the reducer.Fast recipe to reproduce :
git clone https://github.com/mxstbr/react-boilerplate.git && cd react-boilerplate && npm install
console.log('Reducer called', action)
at the start ofappReducer
in~/app/containers/App/reducer.js
http://localhost:3000
, move back and forth between the Features and the Home page, and watch the log outputMind that the replay will only occur when going to the Home page and not when going to the Features page. This is due to the fact that the Features page is not injecting a reducer, and so not replacing the store's reducer, while the Home page is.
The text was updated successfully, but these errors were encountered: