Files
SnapOtter/apps/web
SnapOtter f68fcb8ca6 fix: cache useSyncExternalStore snapshot to prevent infinite re-render
getSnapshot() was calling JSON.parse() on every invocation, returning
a new array reference each time. useSyncExternalStore uses Object.is
comparison, so it saw a "new" value on every render and triggered
an infinite update loop. Fix by caching the parsed result and only
re-parsing when the raw localStorage value changes.
2026-06-14 20:31:49 +08:00
..