Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "reducer"

Index

Type aliases

ActionReducer

ActionReducer: function

Type declaration

    • (state: TState, payload: TPayload): Partial<TState>
    • Parameters

      • state: TState
      • payload: TPayload

      Returns Partial<TState>

ActionsHandler

ActionsHandler: function

Type declaration

    • (state: TState, action: any): void
    • Parameters

      • state: TState
      • action: any

      Returns void

Variables

Const RootReducerName

RootReducerName: "@root" = "@root"

Name for RootReducer

Functions

createRootReducer

  • createRootReducer<TState>(initState?: Partial<TState>): IRootReducer<TState, TState>
  • Initialize RootReducer class with given initState, its special reducer for passing to createStore

    Type parameters

    • TState

    Parameters

    • Optional initState: Partial<TState>

      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 join another reducer, this must be a plain object with the same shape as the keys passed to it. Otherwise, you are free to pass anything that your reducer can understand.

    Returns IRootReducer<TState, TState>

createSubReducer

  • createSubReducer<TParentState, TState>(name: keyof TParentState, initState?: Partial<TState>): ISubReducer<TParentState, TState>
  • Initialize SubReducer class with given name (key) and [initState]

    Type parameters

    • TParentState

    • TState

    Parameters

    • name: keyof TParentState

      That argument is key in state object.

    • Optional initState: Partial<TState>

      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 join another reducer, this must be a plain object with the same shape as the keys passed to it. Otherwise, you are free to pass anything that your reducer can understand.

    Returns ISubReducer<TParentState, TState>

Generated using TypeDoc