-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
请问:dispatch一个不存在的action,是否会报错?是否能在onError中捕获到? #416
Labels
Comments
感觉应该直接抛错,但这是逻辑错误,不会走 onError。我自己写项目时也遇到过好几次。 |
我觉得框架应该在没有action匹配时至少报个警告错误。我自己无法判断该action是无效的。 |
不一定需要报错吧...因为在某些场景下是正常情况 比如: 完全不用考虑 action 是否存在 不知道你们的场景是啥样的, 我好像没遇到过需要报错的情况 |
的确。今天我不小心写错namespace了,dispatch调model时控制台不提示报错页面也没啥任何反应。 |
直接报错可能不是好的实践。
|
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dispatch一个不存在的action,是否会报错?是否能在onError中捕获到?
The text was updated successfully, but these errors were encountered: