Skip to content

Commit

Permalink
tao of react
Browse files Browse the repository at this point in the history
  • Loading branch information
genie-youn committed Mar 11, 2021
1 parent 4f652b5 commit 59fbe64
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions 아티클/Tao_of_React.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,16 @@
- Rerenders - Callbacks, Arrays and Objects

테스팅
- 스냅샷 테스트에 의존하지 말 것
+ 리액트로 처음 개발을 시작한 2016년 이후로 스냅샷 테스트가 컴포넌트의 버그를 잡아낸건 단 한번 뿐
+ 그 외에는 컴포넌트를 변경하고, 스냅샷이 실패하고 이를 업데이트하고..
+ 좋은 컴포넌트 레벨의 테스트를 대체할 수 있는 테스트는 아니라고 생각하며 필자는 더 이상 스냅샷 테스트를 만들지 않음
- 정상적으로 렌더링 하는지 테스트할 것
+ 주어진 input (props)에 대하여 정상적인 output (jsx) 를 반환하는지 테스트해라
- 이벤트와 상태를 검증할 것
- 예외 케이스를 테스트 할 것
- 인티그레이션 테스트를 작성할 것

스타일링
- CSS in JS 를 사용할 것
- 스타일 컴포넌트도 함께 사용할 것

0 comments on commit 59fbe64

Please sign in to comment.