All Projects → ilxanlar → react-hooks-form

ilxanlar / react-hooks-form

Licence: other
React Forms the Hooks Way

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-hooks-form

react-cool-form
😎 📋 React hooks for forms state and validation, less code more performant.
Stars: ✭ 246 (+884%)
Mutual labels:  hooks, form
React Hook Form
📋 React Hooks for form state management and validation (Web + React Native)
Stars: ✭ 24,831 (+99224%)
Mutual labels:  hooks, form
react-useForm
World's simplest React hook to manage form state
Stars: ✭ 30 (+20%)
Mutual labels:  hooks, form
Formik
Build forms in React, without the tears 😭
Stars: ✭ 29,047 (+116088%)
Mutual labels:  hooks, form
Fielder
A field-first form library for React and React Native
Stars: ✭ 160 (+540%)
Mutual labels:  hooks, form
Resolvers
📋 Validation resolvers: Zod, Yup, Joi, Superstruct, and Vest.
Stars: ✭ 222 (+788%)
Mutual labels:  hooks, form
stook
A minimalist design state management library for React.
Stars: ✭ 86 (+244%)
Mutual labels:  hooks, form
Usetheform
React library for composing declarative forms, manage their state, handling their validation and much more.
Stars: ✭ 40 (+60%)
Mutual labels:  hooks, form
Formium
The headless form builder for the modern web.
Stars: ✭ 78 (+212%)
Mutual labels:  hooks, form
React Form
⚛️ Hooks for managing form state and validation in React
Stars: ✭ 2,270 (+8980%)
Mutual labels:  hooks, form
React Hooks Helper
A custom React Hooks library that gives you custom hooks for your code.
Stars: ✭ 227 (+808%)
Mutual labels:  hooks, form
react-search
This package will help you create a pretty good and beautiful search. And other related features
Stars: ✭ 17 (-32%)
Mutual labels:  form
tform
A easy, extensible and dynamic flutter form framework. Support for custom selectors, validators and widgets. Support form verification, insert, delete and so on.
Stars: ✭ 30 (+20%)
Mutual labels:  form
powerform
A powerful form model.
Stars: ✭ 46 (+84%)
Mutual labels:  form
readonly.js
Make form controls - even <select> - read-only.
Stars: ✭ 35 (+40%)
Mutual labels:  form
forms
A library to easily define and create forms, written in Kotlin
Stars: ✭ 39 (+56%)
Mutual labels:  form
formurai
Lightweight and powerfull library for declarative form validation
Stars: ✭ 49 (+96%)
Mutual labels:  form
final-form-arrays
Array Mutators for 🏁 Final Form
Stars: ✭ 64 (+156%)
Mutual labels:  form
react-input-handler
⚡️ Utility function to handle input changes in React.
Stars: ✭ 15 (-40%)
Mutual labels:  form
ember-validity-modifier
Ember Octane addon to add custom validity (form validation) to form fields
Stars: ✭ 28 (+12%)
Mutual labels:  form

React Hooks Form

React Hooks Form offers an easy way to manage your forms in React. It's built using the famous React Hooks!

Documentation

You can find the complete documentation here.

Usage

Install via NPM or Yarn:

npm install react-hooks-form --save
yarn add react-hooks-form

The following code snippet is a basic example of using React Hooks Form.

import React from 'react'
import { Form, FormField } from 'react-hooks-form'

async function handleSubmit(values) {
  try {
    await _myApiRequest(values)
  } catch (error) {
    alert(error.message)
  }
}

function SignUpForm() {
  return (
    <Form onSubmit={handleSubmit}>
      <FormField component="input" name="fullName" type="text" />
      <FormField component="input" name="email" type="text" />
      <FormField component="input" name="password" type="password" />
      <button type="submit">Sign Up</button>
    </Form>
  )
}

Hooks

// Hook to field value
const amount = useFormFieldValue('amount')

// Hook to field error, focus status and ...
const {
  active,
  error,
  invalid,
  visited
} = useFormFieldMeta('amount')

// Hook to get form all values
const values = useFormValues()

// Hook to form submission status, errors and ...
const {
  submitting,
  submitFailed,
  submitSucceeded,
  error
} = useFormMeta()

// Hook to access form API
const formApi = useForm() // There are plenty of methods
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].