Skip to content

v2.0 中 createForm 的使用方式,是否需要用useMemo包一下 #1223

Answered by janryWang
Nokecy asked this question in Q&A [1.x]
Discussion options

You must be logged in to vote

目前createForm是支持单例模式和多实例模式的,这个主要根据用户场景来看,比如用户场景是SPA应用,那必然是走多实例模式要更好,因为方便内存回收,当然单例模式是会在FormProvider被卸载的时候回收Form实例内部的所有监听器,只是闭包内不能回收Form实例这个引用

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by janryWang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants