From f31ff8e1a3b3d4f013f76aadecea4aa225650151 Mon Sep 17 00:00:00 2001 From: junwen-k <40173716+junwen-k@users.noreply.github.com> Date: Sun, 16 Jun 2024 00:20:03 +0800 Subject: [PATCH] fix(create-ask): add server snapshot --- packages/use-ask/src/create-ask.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/use-ask/src/create-ask.ts b/packages/use-ask/src/create-ask.ts index 4f3d548..e4c2a6a 100644 --- a/packages/use-ask/src/create-ask.ts +++ b/packages/use-ask/src/create-ask.ts @@ -14,5 +14,5 @@ export const createAsk =
( ): CreateAskReturn
=> { const store = new AskStore
(initialPayload) - return [store, () => useSyncExternalStore(store.subscribe, store.getSnapshot)] + return [store, () => useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot)] }