Redux basic

왜 리덕스를 사용할까?

  • state를 한 곳에서 관리하기 위해서
  • props 드릴링을 하지 않고, state를 모든 컴포넌트에서 사용하기 위해서

Redux 구성요소

  • Store
  • Ducks
    • Action & Action Creator
    • Reducer
      • Reducer의 특성
        • 순수 함수
        • 불변성 유지 (읽기 전용)
        • 단일 스토어

packages

  • redux
  • react-redux
  • redux-devtools-extension
  • styled-components

redux-actions와 immer, logger는 사용하지 않음

시작하기

터미널을 켜고 git clone https://github.com/with-key/hh99_redux-basic.git' 하고 npm i 를 한다.