Skip to content

@epikodelabs/streamix


@epikodelabs/streamix / src/public-api / trackDependencies

Function: trackDependencies() ​

trackDependencies<T>(fn, options?): object

Defined in: projects/libraries/streamix/src/lib/atoms/atom.ts:233

Runs the provided function inside a fresh formula context and returns both its result and the set of atoms that were read. Useful for reactive renderers that need to discover dependencies without manually walking every proxy layer.

Type Parameters ​

T ​

T

Parameters ​

fn ​

() => T

options? ​

allowUnavailable? ​

boolean

Returns ​

object

result ​

result: T

dependencies ​

dependencies: Set<DependencySource<any>>

Released under the MIT License.