React Hook Form
next-safe-action works great in combo with React Hook Form.
By using the react-hook-form adapter, you'll get first-class integration and complete customization for advanced use cases. First, install the following dependencies:
- npm
- Yarn
- pnpm
npm i next-safe-action react-hook-form @hookform/resolvers @next-safe-action/adapter-react-hook-form
yarn add next-safe-action react-hook-form @hookform/resolvers @next-safe-action/adapter-react-hook-form
pnpm add next-safe-action react-hook-form @hookform/resolvers @next-safe-action/adapter-react-hook-form
Then, take a look at the project page on GitHub to learn how to use it: @next-safe-action/adapter-react-hook-form.