Skip to content

Conversation

jejukyj
Copy link
Member

@jejukyj jejukyj commented Oct 18, 2024

이번 스터디를 진행하며 새로 알게 된 점

✔️ state 구조화 원칙

  • 연관된 state 그룹화
  • state 모순(불일치) 피하기
  • 불필요한 state 피하기
  • state 중복 피하기
  • 깊게 중첩된 state 피하기

✔️ State 변수가 객체인 경우에는 다른 필드를 명시적으로 복사하지 않고 하나의 필드만 업데이트할 수 없다!
✔️ state 끌어올리기 : 두 컴포넌트의 state를 항상 함께 변경해야할 때 사용한다

과제 수행 과정에서 어려웠던 점

  • 상위로 state를 끌어올리고, 그 값을 props로 전달하고, state를 업데이트하는 함수를 정의하고.. 하는 이 과정들이 아직 익숙하지 않아서 버벅이게 된다..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant