Coder Social home page Coder Social logo

xstad / react-hook-form Goto Github PK

View Code? Open in Web Editor NEW

This project forked from react-hook-form/react-hook-form

0.0 0.0 0.0 26.03 MB

๐Ÿ“‹ React Hooks for form state management and validation (Web + React Native)

Home Page: https://react-hook-form.com

License: MIT License

Shell 0.01% JavaScript 0.87% TypeScript 99.02% CSS 0.08% HTML 0.03%

react-hook-form's Introduction

Demo.mp4

npm downloads npm npm Discord

Get started | API | Examples | Demo | Form Builder | FAQs

Features

Install

npm install react-hook-form

Quickstart

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 (
    <form onSubmit={handleSubmit(onSubmit)}>
      <input {...register('firstName')} />
      <input {...register('lastName', { required: true })} />
      {errors.lastName && <p>Last name is required.</p>}
      <input {...register('age', { pattern: /\d+/ })} />
      {errors.age && <p>Please enter number for age.</p>}
      <input type="submit" />
    </form>
  );
}

Sponsors

Thanks go to these kind and lovely sponsors (companies and individuals)!

@sayav @lemcii @washingtonsoares @lixunn @SamSamskies @peaonunes @wilhelmeek @iwarner @joejknowles @chris-gunawardena @Tymek @Luchanso @vcarel @gragland @tjshipe @krnlde @msutkowski @mlukaszczyk

Backers

Thanks go to all our backers! [Become a backer].

Contributors

Thanks go to these wonderful people! [Become a contributor].

Helpers

Thank you for helping and answering questions from the community.

Organizations

Thanks go to these wonderful organizations! [Contribute].

react-hook-form's People

Contributors

bluebill1049 avatar kotarella1110 avatar keiya01 avatar ayumikai avatar stramel avatar jeromedeleon avatar barrymay avatar pmaier983 avatar neighborhood999 avatar michalbundyra avatar leapful avatar felixschorer avatar michaltarasiuk avatar lincerossa avatar yi-tuan avatar tanmen avatar ldanet avatar kabriel avatar dandv avatar yonycalsin avatar yhor1e avatar matamatanot avatar daisuke85a avatar simplycomplexable avatar tiii avatar petercpwong avatar nickman87 avatar luchanso avatar krnlde avatar jgullstr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.