DEV Community

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

Collapse
 
matfrana profile image
Matteo Frana

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.