Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

redux devtools extention in 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',
  })
Source by selleo.com #
 
PREVIOUS NEXT
Tagged: #redux #devtools #extention #redux #toolkit
ADD COMMENT
Topic
Name
2+6 =