Skip to content

@epikodelabs/streamix


@epikodelabs/streamix / react/src/public-api / StreamixLifetime

Interface: StreamixLifetime ​

Defined in: projects/libraries/streamix/react/src/lib/runtime.ts:47

Explicit lifetime for compiler-owned atom and scope instances beneath React Activity/Offscreen. React effect cleanup is not an unmount signal: hidden trees tear down effects and later reuse the same hook state.

Create this outside the hidden subtree, place a StreamixLifetimeProvider around it, and call lifetime.dispose() when the containing feature is permanently destroyed. Only committed instances are registered.

Properties ​

disposed ​

readonly disposed: boolean

Defined in: projects/libraries/streamix/react/src/lib/runtime.ts:48

Methods ​

retain() ​

retain(value): void

Defined in: projects/libraries/streamix/react/src/lib/runtime.ts:49

Parameters ​

value ​

unknown

Returns ​

void


dispose() ​

dispose(): void

Defined in: projects/libraries/streamix/react/src/lib/runtime.ts:50

Returns ​

void

Released under the MIT License.