issues
search
WonhyeongLee
/
Wonhyeong.develop.log
공부 기록용 블로그
BSD Zero Clause License
0
stars
0
forks
source link
Refact: ContextAPI에서 Redux toolkit으로 리팩토링
#16
Closed
WonhyeongLee
closed
1 year ago
WonhyeongLee
commented
1 year ago
작업내용
redux toolkit 관련 패키지인 @reduxjs/toolkit react-redux 를 설치했습니다.
전체 store와 rootReducer을 관리하는 app 폴더와 기능별로 폴더를 분리하기 위한 features 폴더를 src/ 아래에 추가했습니다.
contextAPI로 구현된 태그 기능을 redux toolkit을 사용해서 구현했습니다. ->
rootReducer.ts
/
store.ts
/
tagsSlice.ts
gatsby-browser.tsx, gatsby-ssr.tsx에 provider을 변경했습니다.
태그 기능을 사용하고 있는 tags, pages/index.ts 파일에서 해당 부분을 바뀐 코드로 변경해줬습니다.
관련 이슈
15
작업내용
관련 이슈
15