diff --git a/src/core/game-client.ts b/src/core/game-client.ts index efae3f5..cef1575 100644 --- a/src/core/game-client.ts +++ b/src/core/game-client.ts @@ -60,7 +60,9 @@ export abstract class BaseGameClient< assignSelector(selector: (t: T) => S, callback: (s: S) => void) { const selected = computed(() => selector(this._context.value)); - return selected.subscribe(callback); + return effect(() => { + callback(selected.value); + }); } addInterruption() {