@laserware/stasis
    Preparing search index...

    Function legacy_createStore

    • 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.

      Type Parameters

      • S
      • A extends Action<string>
      • Ext extends {} = {}
      • StateExt extends {} = {}

      Parameters

      • reducer: Reducer<S, A>

        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().

      Returns Store<S, A, UnknownIfNonSpecific<StateExt>> & Ext

      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.

      Type Parameters

      • S
      • A extends Action<string>
      • Ext extends {} = {}
      • StateExt extends {} = {}
      • PreloadedState = S

      Parameters

      • reducer: Reducer<S, A, PreloadedState>

        A function that returns the next state tree, given the current state tree and the action to handle.

      • OptionalpreloadedState: PreloadedState

        The 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().

      Returns Store<S, A, UnknownIfNonSpecific<StateExt>> & Ext

      A Redux store that lets you read the state, dispatch actions and subscribe to changes.