Learn / From declarations to the screen
From a Selection to a drawing
An Entity.select names the fields and relations a screen needs, and foldkit-remote assembles that value from the normalized entity store in your Model. When a read visits a product entry and its owner entry, Remote reuses the assembled result while those visited entries keep the same object identity.
At the view layer, Projection.derive reuses its computed result while its declared Model paths remain identical. When a SlotView.region renders a Projection, it compares those projected inputs by identity and skips re-drawing its DOM subtree when nothing changed.
Note the boundary between Remote reads and Model paths:
- A Remote read tracks requirements in store metadata rather than a direct
Modelpath, so a region reading it evaluates the read on render and skips re-drawing when the returned selection matches. - A Projection over
App.model.<field>skips re-runningderivecompletely while thatModelslice is unchanged.
Separately, Bundle placements, collection items, and Link.child views skip re-drawing while the child's Model keeps the same object reference (pass memo: false to opt out). Ordinary Projection.derive always requires an explicit dependency list beside its function; pass verify: true in development to catch reads outside that declared list. See regions in Mixins and derivations in Surface.