agents
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user