Skip to main content

# configureStore()

    function configureStore(
       initialState: CombinedState,
       history: History,
       middlewareConfig?: MiddlewareConfig,
       injectedReducers?: InjectedReducers): ToolkitStore<EmptyObject & {
      breakpoint: BreakpointState;
      error: ErrorState;
      liveMessage: LiveMessageState;
      waitMessage: WaitMessageState;
    },
      | AnyAction
      | {
      payload: WaitMessageState;
      type: string;
    }
      | {
      payload: Breakpoints;
      type: string;
    }, MiddlewareArray<[ListenerMiddleware<unknown, ThunkDispatch<unknown, unknown, AnyAction>, unknown>, ThunkMiddleware<CombinedState<{
      breakpoint: BreakpointState;
      error: ErrorState;
      liveMessage: LiveMessageState;
      waitMessage: WaitMessageState;
    }>, AnyAction>, ...(SagaMiddleware<object> | Middleware<any, any, Dispatch<AnyAction>>)[]]>>;

Creates and configures the Redux store with SDK middleware and enhancers. Includes saga middleware, listener middleware, RTK Query support, and hot reloading.

## Parameters​

### initialState​

`CombinedState` = `...`

Initial Redux state (defaults to empty object)

### history​

`History`

History instance for routing integration

### middlewareConfig?​

`MiddlewareConfig`

Middleware configuration options

### injectedReducers?​

`InjectedReducers`

Pre-injected reducers

## Returns​

`ToolkitStore`<`EmptyObject` & { `breakpoint`: `BreakpointState`; `error`: `ErrorState`; `liveMessage`: `LiveMessageState`; `waitMessage`: `WaitMessageState`; }, | `AnyAction` | { `payload`: `WaitMessageState`; `type`: `string`; } | { `payload`: `Breakpoints`; `type`: `string`; }, `MiddlewareArray`<[`ListenerMiddleware`<`unknown`, `ThunkDispatch`<`unknown`, `unknown`, `AnyAction`>, `unknown`>, `ThunkMiddleware`<`CombinedState`<{ `breakpoint`: `BreakpointState`; `error`: `ErrorState`; `liveMessage`: `LiveMessageState`; `waitMessage`: `WaitMessageState`; }>, `AnyAction`>, ...(SagaMiddleware<object> | Middleware<any, any, Dispatch<AnyAction>>)[]]>>

Configured Redux store

## Example​

    import { createAppStore, history } from '@elliemae/pui-app-sdk';

    const store = createAppStore({}, history);