https://github.com/mumer29/react-hooks-forms
https://github.com/mumer29/react-hooks-forms
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mumer29/react-hooks-forms
- Owner: mumer29
- Created: 2021-05-23T08:12:28.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-23T08:22:19.000Z (about 5 years ago)
- Last Synced: 2025-06-22T13:02:56.594Z (about 1 year ago)
- Language: HTML
- Size: 191 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/react-hook-form)
[](https://www.npmjs.com/package/react-hook-form)
[](https://github.com/react-hook-form/react-hook-form/blob/master/LICENSE)
[](https://discord.gg/yYv7GZ8)
Version 7 | [Version 6](/docs/README.V6.md)
## Features
- Built with performance and DX in mind
- Embraces native form validation
- Out of the box integration with [UI libraries](https://codesandbox.io/s/react-hook-form-v7-controller-5h1q5)
- [Small size](https://bundlephobia.com/result?p=react-hook-form@latest) and no [dependencies](./package.json)
- Follows HTML standard for [validation](https://react-hook-form.com/get-started#Applyvalidation)
- Support [Yup](https://github.com/jquense/yup), [Zod](https://github.com/vriad/zod), [Superstruct](https://github.com/ianstormtaylor/superstruct), [Joi](https://github.com/hapijs/joi), [Vest](https://github.com/ealush/vest), [class-validator](https://github.com/typestack/class-validator), [io-ts](https://github.com/gcanti/io-ts), [nope](https://github.com/bvego/nope-validator) or custom
## Install
npm install react-hook-form
## Links
- [Get started](https://react-hook-form.com/get-started)
- [API](https://react-hook-form.com/api)
- [Examples](https://github.com/bluebill1049/react-hook-form/tree/master/examples)
- [Demo](https://react-hook-form.com)
- [Form Builder](https://react-hook-form.com/form-builder)
- [FAQs](https://react-hook-form.com/faqs)
## Quickstart
```jsx
import React from 'react';
import { useForm } from 'react-hook-form';
function App() {
const {
register,
handleSubmit,
formState: { errors },
} = useForm();
const onSubmit = (data) => console.log(data);
return (
{/* register an input */}
{errors.lastName &&
Last name is required.
}
{errors.age && Please enter number for age.
}
);
}