We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
effects这个词,给我的感觉更多是副作用,类似watch监听导致的watchEffect,或者是useEffect产生的副作用。如果watch特性上线,应该给effect换名的。 我的提议是把异步action放到actions,不知道判断一下返回值为Promise可不可以实现。
The text was updated successfully, but these errors were encountered:
actions在部分状态库中叫 reducers,叫法上后者比较贴切; effects确实提供了副作用的功能,比如 setState,比如 loading; 而watch特性应该会直接开一个watch属性; 至于普通的返回,其实更应该叫做methods,只不过effects也能返回数据,所以就合并在一起了。
setState
loading
methods
这个问题我也想了挺久,也参考了其他库的规范,但是没有统一的定论。
命名这块,可谓仁者见仁。后期可能会修改的方案:
actions
reducers
effects
Sorry, something went wrong.
refactor: rename actions->reducers and effects->methods from defineMo…
3e43aa2
…del (#29)
No branches or pull requests
effects这个词,给我的感觉更多是副作用,类似watch监听导致的watchEffect,或者是useEffect产生的副作用。如果watch特性上线,应该给effect换名的。
我的提议是把异步action放到actions,不知道判断一下返回值为Promise可不可以实现。
The text was updated successfully, but these errors were encountered: