class EffectScope

Properties

active

Signature
active: boolean;

cleanups

Signature
cleanups: (() => void)[];

effects

Signature
effects: ReactiveEffect[];

parent

Signature
parent: EffectScope | undefined;

scopes

Signature
scopes: EffectScope[] | undefined;

Constructors

(constructor)(detached)

Constructs a new instance of the EffectScope class

Parameters
Name Type Description

detached

boolean

Signature
constructor(detached?: boolean);

Methods

off()

Signature
off(): void;

on()

Signature
on(): void;

run(fn)

Parameters
Name Type Description

fn

() => T

Returns

T | undefined

Signature
run<T>(fn: () => T): T | undefined;

stop(fromParent)

Parameters
Name Type Description

fromParent

boolean

Returns

void

Signature
stop(fromParent?: boolean): void;