Skip to content

Commit 567352a

Browse files
orionmizclaude
andauthored
fix(plugin-history-sync): add getServerSnapshot to useSyncExternalStore for SSR compatibility (#643)
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 260008a commit 567352a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@stackflow/plugin-history-sync": patch
3+
---
4+
5+
Fix SSR compatibility by adding getServerSnapshot parameter to useSyncExternalStore. This resolves the "Missing getServerSnapshot, which is required for server-rendered content" error in SSR environments.

extensions/plugin-history-sync/src/historySyncPlugin.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ export function historySyncPlugin<
175175
const activityActivationCounts = useSyncExternalStore(
176176
subscribeActivityActivationCountsChange,
177177
getActivityActivationCounts,
178+
getActivityActivationCounts,
178179
);
179180

180181
return (

0 commit comments

Comments
 (0)