Repository navigation
React "children" should not be passed as prop ? #1088
|
According to the example in https://tanstack.com/form/latest/docs/framework/react/examples/simple, we can do something like this: TanStack Forms says: but Sonar says:
Which recommendation should I trust now? Is there an alternative way in |
Answered by
crutchcorn
Dec 27, 2024
Replies: 1 comment
|
You can pass the function as a child: <form.Field>{()=>{}}</form.Field> But it's fine either way. It won't break anything if you use our suggested syntax |
0 replies
Answer selected by
crutchcorn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can pass the function as a child:
<form.Field>{()=>{}}</form.Field>
But it's fine either way. It won't break anything if you use our suggested syntax