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

Migration guide for 4.0 #3138

Closed
SoundBot opened this issue Sep 17, 2018 · 4 comments
Closed

Migration guide for 4.0 #3138

SoundBot opened this issue Sep 17, 2018 · 4 comments

Comments

@SoundBot
Copy link

After upgrading to 4.0 I'm getting a lot of errors about my store.getState() usage: You may not call store.getState() while the reducer is executing. It was working without any issues in 3.7.2
I don't see any migration guide. Please advise.

@markerikson
Copy link
Contributor

There really shouldn't be any migration guide, because the changes were primarily around TypeScript typings.

Can you provide a project that reproduces the issue? Just saying that the error is happening doesn't tell us what's going on.

@SoundBot
Copy link
Author

SoundBot commented Sep 17, 2018

@markerikson I'm calling store.getState() inside one of my actions. I strongly suspect that this commit #1569 is causing this issue.

@markerikson
Copy link
Contributor

As I said: please show the code that is involved here, preferably the entire application if possible.

@timdorr
Copy link
Member

timdorr commented Sep 17, 2018

Please see #1568. If you've already started the dispatch process and are calling another action, it sounds like you have an impure reducer, which is an anti-pattern in Redux.

@timdorr timdorr closed this as completed Sep 17, 2018
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

No branches or pull requests

3 participants