Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified

์œ ์—ฐํ•˜๊ณ  ํ™•์žฅ ๊ฐ€๋Šฅํ•œ ์‚ฌ์šฉํ•˜๊ธฐ ์‰ฌ์šด ๊ณ ์„ฑ๋Šฅ ํผ ๊ฒ€์ฆ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ

npm downloads npm npm Coverage Status

Tweet Join the community on Spectrum

English | ็นไธญ | ็ฎ€ไธญ | ๆ—ฅๆœฌ่ชž | ํ•œ๊ตญ์–ด | Franรงais | Italiano | Portuguรชs | Espaรฑol | ะ ัƒััะบะธะน | Deutsch | Tรผrkรงe

ํŠน์ง•

  • ์„ฑ๋Šฅ๊ณผ DX๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ๊ตฌ์ถ•
  • ์ œ์–ด๋˜์ง€ ์•Š๋Š” ์–‘์‹ ๊ฒ€์ฆ
  • ์ œ์–ด ๋œ ์–‘์‹์˜ ์„ฑ๋Šฅ์„ ํ–ฅ์ƒ์‹œํ‚ต๋‹ˆ๋‹ค
  • ์˜์กด์„ฑ ์—†๋Š” ์ž‘์€ ์šฉ๋Ÿ‰
  • HTML ํ‘œ์ค€์„ ๋”ฐ๋ฅด๋Š” ๊ฒ€์ฆ
  • React Native ์™€ ํ˜ธํ™˜
  • Yup, Joi, Superstruct ๋˜๋Š” custom ์ง€์›
  • ๋ธŒ๋ผ์šฐ์ € ๋„ค์ดํ‹ฐ๋ธŒ ๊ฒ€์ฆ ์ง€์›
  • Form Builder๋กœ ํผ ๋น ๋ฅด๊ฒŒ ์ƒ์„ฑ

์„ค์น˜

$ npm install react-hook-form

๋งํฌ

์‹œ์ž‘ํ•˜๊ธฐ

import React from 'react';
import { useForm } from 'react-hook-form';

function App() {
  const { register, handleSubmit, errors } = useForm(); // initialise the hook
  const onSubmit = (data) => {
    console.log(data);
  };

  return (
    <form onSubmit={handleSubmit(onSubmit)}>
      <input name="firstname" ref={register} /> {/* register an input */}
      <input name="lastname" ref={register({ required: true })} />
      {errors.lastname && 'Last name is required.'}
      <input name="age" ref={register({ pattern: /\d+/ })} />
      {errors.age && 'Please enter number for age.'}
      <input type="submit" />
    </form>
  );
}

๊ธฐ์—ฌ์ž

๋ชจ๋“  ๊ธฐ์—ฌ์ž ๋ถ„๋“ค๊ป˜ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค! [๊ธฐ์—ฌํ•˜๊ธฐ]

์กฐ์ง

์ด ํ›Œ๋ฅญํ•œ ์กฐ์ง์— ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค! [๊ธฐ์ฆํ•˜๋‹ค]

ํ›„์›์ž

๋ชจ๋“  ํ›„์›์ž ๋ถ„๋“ค๊ป˜ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค! [ํ›„์›ํ•˜๊ธฐ]