Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- JPA
- golang
- go
- Gin
- frontend
- Chakra
- Spring
- react-hook-form
- typescript
- hook
- test
- springboot
- designpatterns
- component
- RTK
- 오블완
- Redux
- tanstackquery
- javascript
- css
- java
- React
- 티스토리챌린지
- backend
- 웹애플리케이션서버
- storybook
- satisfiles
- ReactHooks
- JavaSpring
Archives
- Today
- Total
목록react-hook-form (1)
bkdragon's log

제출 폼은 UI 요소라고 라기 보단 개발용어(?)의 느낌이다. 물론 아주 개인적인 의견이다. 재사용성 있게 만들어보고 싶어서 만들어보았다! 검증을 편하게 하기 위해 react-hook-form을 사용해서 만들었다. react-hook-form의 간단한 예제 코드로 역할도 할 수 있는 글이 되지 않을까싶다. 우선 전체를 담당하는 Form form.tsx interface Props { title: string; onSubmit: (data: TFormData) => void; list: InputList; } const Form = ({ title, onSubmit, list, }: Props) => { const { control, handleSubmit } = useForm({ criteriaMode:..
UI UX
2023. 8. 23. 23:41