DerivedOptions

Interface: DerivedOptions<TState, TArr>

Type Parameters

TState

TArr extends ReadonlyArray<Derived<any> | Store<any>> = ReadonlyArray<any>

Properties

deps

ts
deps: TArr;
deps: TArr;

Defined in

derived.ts:47


fn()

ts
fn: (props) => TState;
fn: (props) => TState;

Values of the deps from before and after the current invocation of fn

Parameters

props

DerivedFnProps<TArr, UnwrapReadonlyDerivedOrStoreArray<TArr>>

Returns

TState

Defined in

derived.ts:51


onSubscribe()?

ts
optional onSubscribe: (listener, derived) => () => void;
optional onSubscribe: (listener, derived) => () => void;

Parameters

listener

Listener<TState>

derived

Derived<TState, readonly any[]>

Returns

Function

Returns

void

Defined in

derived.ts:42


onUpdate()?

ts
optional onUpdate: () => void;
optional onUpdate: () => void;

Returns

void

Defined in

derived.ts:46

Subscribe to Bytes

Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.

Bytes

No spam. Unsubscribe at any time.