-
-
Notifications
You must be signed in to change notification settings - Fork 245
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
Throw in reducer is not cancel computation of other reducers #90
Comments
This comment has been minimized.
This comment has been minimized.
related issue #51 |
Throwing errors is the completely wrong way to organize business logic, you don't need it at all because of filters, created especially for such cases. It more readable and significantly less error-prone than dealing with throw on a daily basis https://share.effector.dev/0zxWY3px |
@zerobias |
Solution testified as well. You are trying to blame for the lack of support of double binding which latest significant appearance was in AngularJS more than five years ago |
If someone forwarded you here, this is an outdated discussion which can not and must not be used as proof of the issues of any kind.
Calling of pure function cannot be detected by definition, thereby preventing from using them in a suggested way
That is, the inability to throw an exception is what make functions pure.
And that is what effects were being made for: effect is a function, which might throw an exception, which triggers a fail branch, which you can subscribe on.
Reducers in
.on
, functions in.map
are pure. You shall not branch them by throwing exceptions. This is not an issue, this is what makes computations predictable and stable.Original issue:
Code to reproduce the issue:
repl
Expected behavior:
Throw all computation
Actual behavior:
Receive wrong data
Versions of packages used:
0.18.16
The text was updated successfully, but these errors were encountered: