Replies: 4 comments 5 replies
-
适用于 Form + Modal 基础使用,不用再 |
Beta Was this translation helpful? Give feedback.
2 replies
-
一般不应该自行维护 React 之外的组件生命周期。 |
Beta Was this translation helpful? Give feedback.
1 reply
-
用 preserve ? |
Beta Was this translation helpful? Give feedback.
1 reply
-
可以拓展一下 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
RFC
Summary
useForm 支持默认不初始化
Motivation
useForm 需要在 render 前初始化,但是 Form 可能需要某个判断,默认不加载,而加载后,也可能需要某个判断再卸载,但是 useForm 就只会加载一次,导致无法跟 Form 的加载卸载同步。
一般这种情况会推荐使用 ref 方式,但是这个用法总是没有 useForm 方便
Detailed design
Drawbacks
无
Alternatives
Unresolved questions
无
Beta Was this translation helpful? Give feedback.
All reactions