A function that returns the next state tree, given the current state tree and the action to handle.
Optionalenhancer: StoreEnhancer<Ext, StateExt>The store enhancer. You may optionally specify it
to enhance the store with third-party capabilities such as middleware,
time travel, persistence, etc. The only store enhancer that ships with Redux
is applyMiddleware().
A Redux store that lets you read the state, dispatch actions and subscribe to changes.
Creates a Redux store that holds the state tree.
We recommend using configureStore from the
@reduxjs/toolkit package, which replaces createStore:
https://redux.js.org/introduction/why-rtk-is-redux-today
The only way to change the data in the store is to call dispatch() on it.
There should only be a single store in your app. To specify how different
parts of the state tree respond to actions, you may combine several reducers
into a single reducer function by using combineReducers.
A function that returns the next state tree, given the current state tree and the action to handle.
OptionalpreloadedState: PreloadedStateThe initial state. You may optionally specify it
to hydrate the state from the server in universal apps, or to restore a
previously serialized user session.
If you use combineReducers to produce the root reducer function, this must be
an object with the same shape as combineReducers keys.
Optionalenhancer: StoreEnhancer<Ext, StateExt>The store enhancer. You may optionally specify it
to enhance the store with third-party capabilities such as middleware,
time travel, persistence, etc. The only store enhancer that ships with Redux
is applyMiddleware().
A Redux store that lets you read the state, dispatch actions and subscribe to changes.
Creates a Redux store that holds the state tree.
We recommend using
configureStorefrom the@reduxjs/toolkitpackage, which replacescreateStore: https://redux.js.org/introduction/why-rtk-is-redux-todayThe only way to change the data in the store is to call
dispatch()on it.There should only be a single store in your app. To specify how different parts of the state tree respond to actions, you may combine several reducers into a single reducer function by using
combineReducers.