Interface Slice<State, CaseReducers, Name>

The return value of createSlice

Type Parameters

Hierarchy

  • Slice

References

Renames and re-exports default

Properties

actions: CaseReducerActions<CaseReducers, Name>

Action creators for the types of actions that are handled by the slice reducer.

caseReducers: SliceDefinedCaseReducers<CaseReducers>

The individual case reducer functions that were passed in the reducers parameter. This enables reuse and testing if they were defined inline when calling createSlice.

getInitialState: (() => State)

Type declaration

    • (): State
    • Provides access to the initial state value given to the slice. If a lazy state initializer was provided, it will be called and a fresh value returned.

      Returns State

name: Name

The slice name.

Generated using TypeDoc