본문 바로가기

개발/react 생태계

[React] redux devTools in toolkit

반응형

redux-toolkit에서 redux devtool을 사용하는 방법은 다음과 같습니다

 

1) chrome 확장자 설치

https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi/related

 

React Developer Tools

Adds React debugging tools to the Chrome Developer Tools. Created from revision 7f673317f on 5/31/2022.

chrome.google.com

 

2) configureStore에 option 추가

const store = configureStore({
  reducer: {
    user: userReducer,
  },
  devTools: process.env.NODE_ENV !== 'production',
});

 

따로, redux-devtools-extension을 설치하지 않아도 됩니다!