• Image placeholder
  • 홈 페이지
  • 블로그 센터
  • 범주
Image placeholder

useselector

#1 Today I Learned - 21.01.04

action action 생성자를 호출했을때 type이 담긴 객체{}를 반환해준다. reducer에서는 switch문으로 현재 받은 action.type 값을 받아 비교하여 값에 맞는 action을 return 해 준다. return 할 때에는 기존 state를 spread 연산자를 이용해 풀어서 넣고 업데이트 할 payload 값을 뒤에 넣어준다. 만약 해당하는 action.type이 있으...

JavaScriptstoreuseselectorreducerreact reduxES6ReactDispatchreduxstyled componentsactionDispatch

© 2022 intrepidgeeks.com

Privacy Policy Contact US Sitemap
🍪 This website uses cookies to ensure you get the best experience on our website. Learn more