[TIL] 2020/10/13

yongkini ·2020년 10월 13일
0

Today I Learned

목록 보기
51/173

Today, I Learned


  • HA day, 사실 그렇게 어렵지는 않았다. 이전에 클론 코딩을 했던 부분이랑 겹치는 것도 많았고, youtube API를 써서 했던 recasy.ly 스프린트랑도 비슷했기에 어려움은 없었다. expressJS를 복습하기도 좋은 시간이였던 것 같다.
  • 어제 redux를 끝내지 않았기에..ㅎㅎ 오늘 마무리해본다.
    redux는 이전의 react방식에서 state 등을 props로 전달해줄 때 그 깊이가 너무 깊어지는 경우 그 중간에 있는 컴포넌트들은 단순 전달자 역할만 하게 되고, 
    너무 깊어지면 관리가 힘들다는 점에서 그러한 비효율적인 측면을 개선하고자 나온 상태 관리 라이브러리이다.
    redux의 장점이라한다면 혹은 redux가 필요한 경우를 말해보면, 
    개발하고자하는 app에 state가 많다면 유용할 것이고, 규모가 큰 경우, 
    state를 변화시킬 경우가 많을 때, state를 변경하는 로직이 매우 복잡할 때 유용하다.
    
  • redux의 유용성에 대해 잘 표현한 것 같은 글 발췌 :
    One way to solve this is to extract the shared state from the components, 
    and put it into a centralized location outside the component tree. 
    With this, our component tree becomes a big "view", and any component can access the state or trigger actions, 
    no matter where they are in the tree!
  • what actions look like :
    const addTodoAction = {
      type: 'todos/todoAdded',
      payload: 'Buy milk'
    }
  • what actions creator looks like :
    const addTodo = text => {
      return {
        type: 'todos/todoAdded',
        payload: text
      }
    }
  • What is Reducer ? : Reducer is kind of eventListener in DOM. it takes action and state for variables and using them it returns the new state(output).
  • Redux Reference
  • Toy 16번 clear : 분명히 규칙이 있다. 잘찾아보자. 그리고 내가 배운 자료구조 등을 이용하자

Planning to Study


  • 아직 redux 마무리 못했다. 내일 꼭 마무리(필수)
  • Toy 17번 푸는겸 asynchronous 파트 복습 + 17번 풀기
profile
완벽함 보다는 최선의 결과를 위해 끊임없이 노력하는 개발자

0개의 댓글