Function derivableProtected
- derivable<State, DerivedState>(create, compute): ((set, get, api) => State & DerivedState)
Protected
Parameters
create: StateCreator<State>
compute: ((state) => DerivedState)
- (state): DerivedState
Returns DerivedState
Returns ((set, get, api) => State & DerivedState)
- (set, get, api): State & DerivedState
Parameters
set: ((partial, replace?) => void)
- (partial, replace?): void
Parameters
partial: State & DerivedState | Partial<State & DerivedState> | ((state) => State & DerivedState | Partial<State & DerivedState>)
Optional
replace: boolean
Returns void
get: (() => State & DerivedState)
- (): State & DerivedState
Returns State & DerivedState
api: StoreApi<State & DerivedState>
Returns State & DerivedState