Redux

코드위의승부사·2019년 12월 17일
0

Redux란?

Redux is a predictable state container for JavaScript applications. It helps you write applications that behave consistently, run in different environments(client, server, and native), and are easy to test.

Redux의 세가지 원칙

  • Single source of truth : Store
  • State is read-only
  • Changes are made with pure functions

Redux의 기본개념

  • Store : 상태가 관리되는 오직 하나의 공간
  • Action : 간단한 자바스크립트 객체
  • Reducer : 현재 상태와 Action을 이용해 다음 상태를 만들어냄

Redux의 장점

  • 상태 예측가능
  • 유지보수
  • 디버깅에 유리하다
  • 테스트를 붙이기 쉽다.
profile
함께 성장하는 개발자가 되고 싶습니다.

0개의 댓글