-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Hey, @nikgraf , thanks for the updated react connector! I was mucking around with useY in Next and got this error from useSyncExternalStore(_, _, getServerSnapshot). According to react docs it seems to stem from the mutability of the return data from that parameter.
This can be avoided by bypassing SSR but I found that using
() => {
const data = yData.toJSON();
if (equalityDeep(prevDataRef.current, data)) {
return prevDataRef.current;
} else {
prevDataRef.current = data;
return prevDataRef.current;
}
}
For both parameters was able to work with SSR.
Metadata
Metadata
Assignees
Labels
No labels