File: derived.md | Updated: 11/15/2025
Search...
+ K
Auto
Docs Examples GitHub Contributors
Docs Examples GitHub Contributors
Docs Examples GitHub Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Maintainers Partners Support Learn StatsBETA Discord Merch Blog GitHub Ethos Brand Guide
Documentation
Framework
React
Version
Latest
Search...
+ K
Menu
Getting Started
API Reference
Examples
Framework
React
Version
Latest
Menu
Getting Started
API Reference
Examples
On this page
Copy Markdown
Class: Derived<TState, TArr>
============================
Defined in: derived.ts:61
Type Parameters
---------------
⢠TState
⢠TArr extends ReadonlyArray<Derived <any> | Store <any>> = ReadonlyArray<any>
Constructors
------------
### new Derived()
ts
new Derived<TState, TArr>(options): Derived<TState, TArr>
new Derived<TState, TArr>(options): Derived<TState, TArr>
Defined in: derived.ts:96
DerivedOptions <TState, TArr>
Derived <TState, TArr>
Properties
----------
### lastSeenDepValues
ts
lastSeenDepValues: unknown[] = [];
lastSeenDepValues: unknown[] = [];
Defined in: derived.ts:78
ts
listeners: Set<Listener<TState>>;
listeners: Set<Listener<TState>>;
Defined in: derived.ts:67
ts
options: DerivedOptions<TState, TArr>;
options: DerivedOptions<TState, TArr>;
Defined in: derived.ts:70
ts
prevState: undefined | TState;
prevState: undefined | TState;
Defined in: derived.ts:69
ts
state: TState;
state: TState;
Defined in: derived.ts:68
Methods
-------
### checkIfRecalculationNeededDeeply()
ts
checkIfRecalculationNeededDeeply(): void
checkIfRecalculationNeededDeeply(): void
Defined in: derived.ts:178
void
ts
getDepVals(): object
getDepVals(): object
Defined in: derived.ts:79
object
ts
currDepVals: unknown[];
currDepVals: unknown[];
ts
prevDepVals: unknown[];
prevDepVals: unknown[];
ts
prevVal: undefined | NonNullable<TState>;
prevVal: undefined | NonNullable<TState>;
ts
mount(): () => void
mount(): () => void
Defined in: derived.ts:199
Function
void
ts
recompute(): void
recompute(): void
Defined in: derived.ts:170
void
ts
registerOnGraph(deps): void
registerOnGraph(deps): void
Defined in: derived.ts:105
readonly ( | Derived <any, readonly any[]> | Store <any, (cb) => any>)[] = ...
void
ts
subscribe(listener): () => void
subscribe(listener): () => void
Defined in: derived.ts:211
#### Parameters ##### listener
Listener<TState>
Function
void
ts
unregisterFromGraph(deps): void
unregisterFromGraph(deps): void
Defined in: derived.ts:147
readonly ( | Derived <any, readonly any[]> | Store <any, (cb) => any>)[] = ...
void
