React Hook Form

It’s possible to build forms using Forma 36’s components and React Hook Form. In this page we will show a couple of examples on how to do that.

Import

import { useForm } from 'react-hook-form';
import {
Form,
FormControl,
Radio,
Checkbox,
Select,
Textarea,
TextInput,
} from '@contentful/f36-forms';

Examples

Example of integration with register()

Example of integration with useController

First, it's necessary to create a controlled component which will use the useController hook and pass its props to the Forma 36 component. Then you use this controlled component in your form:

Help improve this page