redux 상태변화1 Redux 3가지 원칙 정리 📍 The truth comes from one source App의 모든 상태는 하나의 저장소에 객체 트리 구조로 저장된다. console.log(store.getState()); /* * { * visibilityFilter: 'SHOW_ALL', * todos: [{ * text: 'Consider using Redux', * completed: true, * }, { *text: 'Keep all state in a single tree', * completed: false * }] * } */ 📍 State is read-only 상태 변경은, 액션 객체(어떤 상태 변화가 일어나야하는 지 기술된 객체)를 통해서만 일어난다. store.dispatch(action: Object) store.dis.. 2021. 11. 4. 이전 1 다음