From d7ca0989e2d63ddb893f567d1727f5347b99dd34 Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Wed, 14 Jun 2023 16:47:07 -0700 Subject: [PATCH] feat: mutate with --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 60de019..734cc25 100644 --- a/src/index.ts +++ b/src/index.ts @@ -65,7 +65,9 @@ export function share( externalUpdate = true; timestamp = evt.timestamp; - store[key] = evt.state; + store.$patch((state: any) => { + state[key] = evt.state; + }); }; const sync = () => channel.postMessage(undefined);