Skip to content

codingspecialist/react-redux-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

리덕스 상태 관리

blog

  • action 포멧
{
    type: "액션의 종류를 한번에 식별할 수 있는 문자열 혹은 심볼",
    payload: "액션의 실행에 필요한 임의의 데이터",
}
{
  "singleQuote": true,
  "semi": true,
  "useTabs": false,
  "tabWidth": 2,
  "trailingComma": "all",
  "printWidth": 80
}
  • yarn add redux react-redux
  • 크롬확장프로그램 redux-devtool 설치
  • yarn add redux-devtools-extension
  • npm install --save styled-components
  • VSCODE 확장 프로그램 vscode-styled-components 설치 (styled-component 자동완성)

combineReducers

export default combineReducers({
    addNumber: addReducer,
    displayNumber: displayReducer
})

이렇게 하면, Reducer분할에 쓰인 Key가 그대로 State분할에도 쓰입니다. 또한 실제로 각각의 reducer의 정의 자체도 다른 파일로 나누는 것이 일반적입니다.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published