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

@@redux/INIT is now unpredictable #2939

Closed
langpavel opened this issue Apr 18, 2018 · 4 comments
Closed

@@redux/INIT is now unpredictable #2939

langpavel opened this issue Apr 18, 2018 · 4 comments

Comments

@langpavel
Copy link

langpavel commented Apr 18, 2018

Do you want to request a feature or report a bug?
A question… or a feature revert request?

(If this is a usage question, please do not post it here—post it on Stack Overflow instead. If this is not a “feature” or a “bug”, or the phrase “How do I...?” applies, then it's probably a usage question.)

No, this is really needed question.

What is the current behavior?

"type": "@@redux/INITv.i.u.x.e",

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar.

Upgrade to v4

What is the expected behavior?

Predictable state which can be checked by snapshot tests

Which versions of Redux, and which browser and OS are affected by this issue? Did this work in previous versions of Redux?

Latest v4

This may be really hot, because Redux state should be predictable. It may be not if you want debug redux in redux.

I have debug reducer which records all dispatched actions on server. I'm careful and have a flag for production where this is not wanted.
But I'm careful on the otherside and I have snapshot test for this store which runs under development environment.
Now I can see @@redux/INITv.i.u.x.e action and many other variants.

Why did you introduce this? Can anybody point me on relevant discussion about this? Please… I'm not sure that this will enhance something, in fact I can remember an article which points on the magic action which is now even more magic :-(

Guys relying (I don't know who can rely on the..) will invent ever more worse regular expression, so:

What the hell is purpose of randomly named action in library which is designed on roots of PURITY without side effects??? I hope that everything can be predictable in Redux

EDIT: Well explained in #186

@langpavel
Copy link
Author

Ok, this can be still be an issue for snapshot testing redux state. I "fixed" :-( my test to not compare against snapshot.

@langpavel
Copy link
Author

langpavel commented Apr 18, 2018

If someone reached this too, I will reopen, so please, lets comment…

@eps1lon
Copy link
Contributor

eps1lon commented Apr 18, 2018

#186 should explain why redux is doing this.

@langpavel
Copy link
Author

Thanks eps1lon, makes sense

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

2 participants