
React-hook-form을 통한 예외처리여러 개의 input tag를 사용하여 컴포넌트를 만들 때에는 보통 react-hook-form을 통해 예외처리를 합니다.import { useForm } from 'react-hook-form';const { register, handleSubmit } = useForm();return ( );위의 코드에서 만약 사용자가 이름을 12자 이상 작성했다면const onValid = (data) => { //do something};const inValid = (e) => { const name = e.name; if (name.type === 'maxLength') { console.log(..