본문 바로가기 메뉴 바로가기

코드를 위한 기록

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

코드를 위한 기록

검색하기 폼
  • 분류 전체보기 (242) N
    • Javascript (15)
    • Typescript (6)
    • CSS (5)
    • 기타 (9)
    • 책 (108) N
    • 코드스테이츠(SEB_FE_42) (93)
    • Java(생활코딩) (6)
  • 방명록

redux-toolkit (1)
[React] Redux-toolkit 같은 슬라이스의 리듀서 사용하기, 리듀서 콘솔 보이게 하기

리듀서 내부에서 같은 슬라이스의 다른 리듀서 사용하기 // 슬라이스명.caseReducers.리듀서명(인자) // state를 사용해야한다면 인자로 state를 전달해주어야 함 customSlice.caseReducers.updateInfo(custom, product, true); 리듀서 내부에서 콘솔 출력했는데 proxy로 나오는 경우, current로 감싸서 확인하기 import { current } from '@reduxjs/toolkit'; ... reducers: { updateInfo: (state, action) => { console.log(current('내용')) }, } * 참고 caseReducers current 2023.04.19

Javascript 2023. 4. 19. 14:59
이전 1 다음
이전 다음
공지사항

Blog is powered by Tistory / Designed by Tistory

티스토리툴바