createThreadSafeStore
fun <State> createThreadSafeStore(reducer: Reducer<State>, preloadedState: State, enhancer: StoreEnhancer<State>? = null): Store<State>
Creates a SYNCHRONIZED, THREADSAFE Redux store that holds the state tree. 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
.
Parameters
{Enhancer} enhancer 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()
.