Controlling Material UI v4’s Checkbox with React Hook Form v7

In Controlling Material UI’s Checkbox with React Hook Form, I introduced how to control Material UI’s Checkbox with React Hook Form v6.

After that, React Hook Form v7 was released.
The way to control Material-UI has changed a little in React Hook Form v7, so I will show you how to control Checkbox in Material UI v4 with typescript.

The control specification of the Checkbox introduced here is the same as the previous one, as follows.

  • Support for initial values (default checks)
  • Control checkbox value changes
  • Set up Checkbox groups using Material UI (multiple checkboxes with the same name)

And the completed checkbox form is the following form.

よかったらシェアしてね!
  • URLをコピーしました!
  • URLをコピーしました!

コメント

コメントする


The reCAPTCHA verification period has expired. Please reload the page.

目次