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 |
Beta Was this translation helpful? Give feedback.
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 |
Beta Was this translation helpful? Give feedback.
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