From 430a50922f982e6c3f139bb0a3d33dc791d29b1a Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Tue, 8 Oct 2024 00:06:03 +0800 Subject: [PATCH] feat: add effectScope API --- lib/effectScope.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/effectScope.ts b/lib/effectScope.ts index 6235ce0..b4be6e2 100644 --- a/lib/effectScope.ts +++ b/lib/effectScope.ts @@ -2,6 +2,10 @@ import { Subscriber } from './system'; export let currentEffectScope: EffectScope | undefined = undefined; +export function effectScope() { + return new EffectScope(); +} + export class EffectScope { subs: Subscriber[] = [];