在addEffects接口中使用onFormReact钩子不生效? #2067
Unanswered
MisicDemone
asked this question in
Q&A [2.x]
Replies: 1 comment 2 replies
-
|
如果是为了依赖收集,observer内部本身就能收集依赖 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
demo可见:https://codesandbox.io/s/sharp-ives-88p0n?file=/App.tsx:315-326
由于addEffects时已经在init生命周期之后了,所以其中的依赖并没有被收集?
目前需要依赖onFormReact的依赖收集能力来实现一些视图交互(表格筛选表单的展开收起),想把这部分逻辑收到一个自定义组件里面,不能再form创建的时候传入effects。
Beta Was this translation helpful? Give feedback.
All reactions