-
Scope: form-renderer Description I have a fairly complex form with nested fields. I use resolveProps to determine the default value. Using formOptions.change() results in a warning as below. Calling this method using setTimeout does not display the warning. I know there used to be a similar problem related to React 16 and react-final-form, but I can't find a solution anywhere. I would expect that using formOptions.change() in resolveProps would not result in a warning. Using data-driven-forms with resolveProps results in a warning:
Schema The schema looks similar to the one below
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello @RusinTom, The warning is correct - As stated in the For your use case, I recommend to implement some custom listener, see the example here and to do side effects in |
Beta Was this translation helpful? Give feedback.
Hello @RusinTom,
The warning is correct -
resolveProps
serves to get props dynamically using formState, it is just a method called when passing props to the component.As stated in the
rules of resolveProps
(read here), this should not be used to do any side effects.For your use case, I recommend to implement some custom listener, see the example here and to do side effects in
useEffect
hook.