Skip to content

@epikodelabs/streamix


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

Function: trackDependencies()

trackDependencies<T>(fn): object

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

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

Returns

object

result

result: T

dependencies

dependencies: Set<Atom<any>>

Released under the GNU AGPL v3 or later.