DEV Community

Discussion on: Turn Anything Into A Form Field With React Hook Form Controller

Collapse
 
the_previ profile image
Luca • Edited

Great article, thanks!
Just a minor thing: in the example of controlled custom component to avoid displaying the warning "Function components cannot be given refs" just avoid to give "ref" prop to the component, like this:

render={({ field: { onChange, value } }) => <StarField onChange={onChange} value={value} />}