()
| 44 | const emptyOverrides = Object.freeze({}) as Record<string, boolean>; |
| 45 | |
| 46 | function getSnapshot(): string { |
| 47 | const raw = JSON.stringify(getOverrides()); |
| 48 | if (raw !== cachedRaw) { |
| 49 | cachedRaw = raw; |
| 50 | cachedParsed = JSON.parse(raw) as Record<string, boolean>; |
| 51 | } |
| 52 | return raw; |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Server-side snapshot for useSyncExternalStore. |
no test coverage detected