mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-24 06:04:57 +05:00
878 B
878 B
The useForm
hook
We are using react-hook-form
for forms, including feature configuration or settings page
Built-in Components
There're some common components such as <FilePicker />
in the src/components/forms/* folder
Controller
We add useController
into custom components so as to provides better code quality
Therefore, You don't have to wrap the inputs into the <Controller />
component
For example, the Color picker & Switch field can be used in this way
<ColorPickerForm
control={{
label: 'Color',
description: 'The color of message',
}}
controller={{ control, name: 'color' }} //from the useForm hook
/>
Example
Take a look at here for examples