react-boilerplate icon indicating copy to clipboard operation
react-boilerplate copied to clipboard

fix injectAsyncReducer

Open oliv37 opened this issue 8 years ago • 0 comments

I think there is a bug in the react boilerplate project you forked -> if you add a console.log(action.type); in a reducer, for example in linkListContainerReducer, you can see the reducer is called multiple times for a single dispatched action. After checking the last version of react-boilerplate, I realised they add this line if (Reflect.has(store.asyncReducers, name)) return; in the injectAsyncReducer function. After restarting the app, the reducer is now called only one time per action.

It would be useful to fix it in your version as it's an initial project from a pluralsight tutorial.

oliv37 avatar Apr 30 '17 01:04 oliv37