You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then you formConfig isn't cached by default. Current solution is to use a mutable variable to store the formConfig:
let mutableformConfig= Unchecked.defaultof<Types.Config<Msg>>// Then to init the formlet(state,config)=
createForm currentUser userInfo
formConfig <- config
let(formState,formCmd)=
Form.init formConfig state
Which isn't perfect. We should make formConfig cached by default and probably handle by the library in a special spaces.
One thing to take care is to destroy an old formConfig that is not useful anymore.
The text was updated successfully, but these errors were encountered:
Issue by MangelMaxime
Tuesday Nov 27, 2018 at 12:47 GMT
Originally opened as MangelMaxime/Thoth#88
The documentation explain this scenario:
So caching
formConfig
is possible directly.But if you have something like:
Then you
formConfig
isn't cached by default. Current solution is to use amutable
variable to store theformConfig
:Which isn't perfect. We should make
formConfig
cached by default and probably handle by the library in a special spaces.One thing to take care is to
destroy
an oldformConfig
that is not useful anymore.The text was updated successfully, but these errors were encountered: