Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix injectAsyncReducer #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix injectAsyncReducer #2

wants to merge 1 commit into from

Conversation

oliv37
Copy link

@oliv37 oliv37 commented Apr 30, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant