Core Concepts
Understanding these fundamental concepts is sufficient to author any StemJSON screen.
| Concept | One-line definition |
|---|---|
| Component | A JSON object node in the render tree. Can be visual (text, button) or non-visual (module, conditional). |
| Module | Non-visual root that owns isolated state and a dependency registry for one screen or feature. |
| Template | A proxy component that renders a reusable component pulled from the dependency registry. |
| Context | A component-scoped property dictionary. Public keys (not prefixed _) are inherited by children; private keys are not. |
| State | Mutable data owned exclusively by a module. State changes trigger re-rendering of the module subtree. |
| Style | Visual and layout modifiers grouped into named domains (layout, common, navigation, button, shape, animation, modal, text, textField, scroll, swipe, shadow, datePicker, section, map, grid, video, pdf, picker, accessibility). |
| Event | A named trigger (e.g. onTap, onAppear) mapped to an ordered array of actions. |
| Action | An executable unit triggered by an event or chained from another action. The sole mechanism for side effects. Co-declared actions (multiple actions in the same event array) run in parallel; chained actions (output.success / output.failure) run sequentially. |
| Repository | A typed dependency providing CRUD data access — local, secured, remote, or firebase. |
| Source | A scheme-prefixed string locator for dependencies, assets, localization keys, and URLs. |