Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Slice<State, CaseReducers, Name>

The return value of createSlice

Type Parameters

Hierarchy

Index

Properties

actions: CaseReducerActions<CaseReducers>

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.

name: Name

The slice name.

reducer: Reducer<State, AnyAction>

The slice's reducer.

Methods

  • getInitialState(): 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

Generated using TypeDoc