“Extensão Redux Devtools no Redux Toolkit” Respostas de código

Extensão Redux Devtools no Redux Toolkit

/*
Redux toolkit by default enables devtools on all environments.
It is best practice to disable devtools on production.
However, some say having devtools enabled in production is not an issue.
*/

const store = configureStore({
    reducer: rootReducer,
    middleware: getDefaultMiddleware(),
    // To disable devtools in production
    devTools: process.env.NODE_ENV !== 'production',
  })
Cupboard Steak

Extensão Redux Devtools

 const store = createStore(
   reducer, /* preloadedState, */
+  window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
 );
putsan

Respostas semelhantes a “Extensão Redux Devtools no Redux Toolkit”

Perguntas semelhantes a “Extensão Redux Devtools no Redux Toolkit”

Mais respostas relacionadas para “Extensão Redux Devtools no Redux Toolkit” em JavaScript

Procure respostas de código populares por idioma

Procurar outros idiomas de código