DEV Community

Discussion on: React Hook Form: the best form library?

noitidart profile image

How does this compare with react-final-form which has hooks? I thought final-form had the best performance.

matfrana profile image
Matteo Frana Author

react-final-form uses a "Render props" pattern: you have to import and use its components:
import { Form, Field } from 'react-final-form'

I don't like this approach because it creates a wrapper hell (nesting of non-rendering components). See the first example: you have RFF's Form wrapping the real form. Also the Field component makes it more difficult to integrate it with other libraries: you have the Field from the form library, the Field from the UI library (for example material-ui) and you need to create another custom Field to wrap the two together.

I see that it has also a useForm hook, but that it needs to be used inside the Form component.

I find React Hook Form to be much more clean.

bluebill1049 profile image

Final-form is great. You are safe with it <3