new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Redux Toolkit · all subjects

configurestore

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

configureStore wraps createStore with simplified defaults

configureStore() wraps createStore to provide simplified configuration options and good defaults. It can automatically combine your slice reducers, adds whatever Redux middleware you supply, includes redux-thunk by default, and enables use of the Redux DevTools Extension.

configureStore automatically combines reducers and adds middleware

The configureStore function sets up a well-configured Redux store with a single function call. It automatically combines reducers using combineReducers, adds the redux-thunk middleware, sets up Redux DevTools integration, and provides an easier configuration interface than createStore with named options parameters.

configureStore automatic setup steps

When you call configureStore, it automatically performs these setup steps: slice reducers are passed to combineReducers, redux-thunk middleware is automatically added, dev-mode middleware is added to catch accidental mutations, Redux DevTools Extension is automatically set up, and the middleware and DevTools enhancers are composed together and added to the store.

configureStore provides options to modify default behaviors

configureStore provides options to let users modify the default behaviors, such as turning off thunks and adding sagas, or disabling the DevTools in production.

configureStore example with multiple slices

Example using configureStore: import { configureStore } from '@reduxjs/toolkit'; import todosReducer from '../features/todos/todosSlice'; import filtersReducer from '../features/filters/filtersSlice'; export const store = configureStore({ reducer: { todos: todosReducer, filters: filtersReducer, }, });

Give your agent this brain