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 · API · all subjects

configurestore api

3 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 function signature and return type

configureStore is a generic function that accepts a ConfigureStoreOptions object and returns an EnhancedStore. The function signature is: configureStore<S = any, A extends Action = UnknownAction, M extends Middlewares<S> = [ThunkMiddlewareFor<S>]>(options: ConfigureStoreOptions<S, A, M>): EnhancedStore<S, A, M>. The default middleware type parameter M defaults to [ThunkMiddlewareFor<S>].

ConfigureStoreOptions interface properties

ConfigureStoreOptions<S, A, M> has the following properties: devTools (boolean | EnhancerOptions, optional), enhancers (StoreEnhancer[] | ConfigureEnhancersCallback, optional), middleware (((getDefaultMiddleware: CurriedGetDefaultMiddleware<S>) => M) | M, optional), preloadedState (PreloadedState<CombinedState<NoInfer<S>>>, optional), reducer (Reducer<S, A> | ReducersMapObject<S, A>, required).

configureStore wraps createStore with defaults

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

Give your agent this brain