mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
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.