Bundle / foldkit-bundle
When to use it
| Situation | Use |
|---|---|
| A child machine placed two or more times, or published for others | a Bundle |
| A child with Subscriptions or resources you keep forgetting to lift | a Bundle, then placements.complete |
A one-off child used in a single place, such as a @foldkit/ui component | a hand-wired Submodel, with a Link as its fold's lens |
| Something without its own Model: a one-shot effect, a DOM attachment | a Command or a Mount, not a Bundle |
A Bundle owns nothing at runtime. The parent Model owns the child's state;
the bundle describes the transitions of that slice, and the Link says which
slice. Two placements are two independent slices with two independent sets of
Subscriptions. To check that ownership beside Sync and Remote, see
foldkit-bundle-surface.
Install
bash
pnpm add foldkit-bundle effect foldkiteffect and foldkit are peer dependencies.