TIL-20220721

__flow__·2022년 7월 21일
0

TIL

목록 보기
18/49
post-thumbnail

회고


  • SICPJS 왜이렇게 어렵지....
    • 정리해서 올리자.
  • WYIS 프로젝트 전반적인 색감은 Material Design 3.0 참고하자(참고라 쓰고 배낀다로 읽는다.
  • 자료구조와 알고리즘은 정말 중요하다.
    • 꼭 정리 및 TIL에 조금이라도 올리자.
  • 작심 3일도 이어지면 꾸준히 한게 되니 포기하지 말자


DSNA | HUFS


  • 자료구조 - 균형이진탐색트리(BBST) 영상시청


React (JS)


  • Preserving and Resetting State
    • (Overview) State is isolated between components. React keeps track of which state belongs to which component based on their place in the UI tree. You can control when to preserve state and when to reset it between re-renders.
    • You will learn
      • How React "sees" component structures
      • When React chooses to preserve or reset the state
      • How to force React to reset component's state
      • How keys and types affect whether the state is preserved
    • The UI tree
    • State is tied to a position in the tree
    • Same component at the same position preserves state
    • Different component at the same position reset state
    • Resetting state at the same position
      • Option 1: Rendering a component in different positions
      • Option 2: Resetting state with a key
      • Resetting a form with a key
    • Recap
      • React keeps state for as long as the same component is rendered at the same position.
      • State is not kept in JSX tags. It's associated with the tree position in which you put that JSX.
      • You can force a subtree to reset its state by giving it a different key.
      • Don't nest component definitions, or you'll reset state by accident.


profile
fullcycle(fullstack), python/javascript, keepflowin, he/him

0개의 댓글