1

how can I add redux devtools with redux toolkit ?

import { configureStore, getDefaultMiddleware, compose } from '@reduxjs/toolkit';
import reducers from './reducers';
import createSagaMiddleware from 'redux-saga';
import saga from './saga';

const sagaMiddleware = createSagaMiddleware();

const store = configureStore({
  reducer: reducers,
  devTools: process.env.NODE_ENV !== 'production',

  middleware: getDefaultMiddleware => getDefaultMiddleware({ thunk: false }).concat(sagaMiddleware)
});
sagaMiddleware.run(saga);

export default store;

..................................................

locklock123
  • 197
  • 1
  • 13

2 Answers2

1

It's activated by default with configureStore() and you can access it with this tool. react-native-debugger

0

As the official documentation specify in the Simplifying Store Setup with configureStore​ section: https://redux-toolkit.js.org/usage/usage-guide#simplifying-store-setup-with-configurestore, you don't have to add anything else since it already does it for you.