Skip to content

Nested schema and conditionally setting the default field value using resolveProps results in a warning #1250

Answered by rvsia
rustoma asked this question in Need help
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rustoma
Comment options

Answer selected by rustoma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1249 on May 11, 2022 14:35.