Isolation
Two unkeyed sibling components that provably cannot re-render each other: Deja state notifies exactly one listener — its owning component.
Component A renders: 3
#1 — delectus aut autem
Component B renders: 3
#2 — quis ut nam facilis et officia qui
Each panel owns its own unkeyed Query<T>. Reloading one advances its render
counter while the other's stays frozen — Deja state notifies a single attached listener, and
that listener is the owning component.
<div class="demo-panels">
<IsolationPanel Title="Component A" TodoId="1"/>
<IsolationPanel Title="Component B" TodoId="2"/>
</div>
<p class="demo-note">
Each panel owns its own unkeyed <code>Query<T></code>. Reloading one advances its render
counter while the other's stays frozen — Deja state notifies a single attached listener, and
that listener is the owning component.
</p>Why this matters#
Event- or store-based state managers broadcast: one component's refresh marches every
subscriber through a re-render. Deja's IDejaObservable holds a
single listener slot — attaching a second listener throws, and the one listener is
the owning component. The render counters make the guarantee observable: reload panel A as
fast as you like, panel B's counter never moves.
Sharing without coupling#
When two components should share data, don't share the query — share the cache entry
by using the same key (see the shared cache demo), or pass
Data down as a [Parameter]. Both paths keep ownership single and
renders scoped.