Hook Form

Combination of MUI and React Hook Form components.


Usage:
import { RHFTextField } from 'src/components/hook-form';
 
<RHFTextField name="fullName" label="Full Name" />;

OR

import { Controller } from 'react-hook-form';
import TextField from '@mui/material/TextField';
 
<Controller
    name="fullName"
    control={control}
    render={({ field, fieldState: { error } }) => (
    <TextField {...field}
      fullWidth label="Full Name"
      value={field.value}
      onChange={field.onChange}
    />
  )}
/>

  • src/components/hook-form

Reference: