This commit is contained in:
2026-05-25 16:35:00 +03:00
parent 4b6c47837f
commit 1e7bcecaea
15 changed files with 11449 additions and 27957 deletions

View File

@@ -1,3 +1,10 @@
# [DEF:ADR-0007:ADR]
# @STATUS REJECTED
# @PURPOSE Document the decision to forbid `fromStore` + multiple `$derived` in Svelte 5 components due to infinite reactive flush loop.
# @RELATION DEPENDS_ON -> [ADR-0006:ADR]
# @RATIONALE fromStore(store) returns a reactive object with .current property. Using it with multiple $derived creates persistent render_effect instances on every reactive re-evaluation, leading to an infinite flush loop and 100% CPU usage after ~300 poll cycles.
# @REJECTED fromStore with multiple $derived in the same component — causes infinite reactive flush loop in Svelte 5 runtime.
# ADR-0007: REJECTED — `fromStore` + multiple `$derived` in Svelte 5
## Status
@@ -59,3 +66,4 @@ $effect(() => {
let foo = $derived(_state?.foo || null);
let bar = $derived(_state?.bar || 0);
```
# [/DEF:ADR-0007:ADR]