@@ -7,6 +7,29 @@ This repo explores a React-like component runtime in Koka, with Algebraic
77Effects used for browser capabilities, test substitution, component-local
88state, and event dispatch.
99
10+ ## Start with component authoring
11+
12+ Learn the normal path as four tasks; runtime ownership and snapshot transport
13+ are advanced integration topics, not prerequisites:
14+
15+ 1 . ** Elements:** write ordinary view functions with positional content and
16+ labelled attributes/events.
17+ 2 . ** Keyed components:** add ` component(...) ` / ` components(...) ` only when a
18+ child needs stable lifecycle identity.
19+ 3 . ** Typed stores/actions:** define a serializable action and use
20+ ` (state, dispatch) = use_store(spec, initial = ...) ` .
21+ 4 . ** Effects:** declare post-render work with ` state_effect(...) ` , and keep
22+ browser/service capabilities as explicit Koka effects.
23+
24+ Start with the bilingual [ component quick start] ( docs/quick-start.md ) , then use
25+ the [ one-page component author API] ( docs/component-authoring.md ) as the normal
26+ reference. Persistent feature identity, recovery, and cross-domain/local
27+ transitions are introduced only when needed:
28+
29+ - [ component lifecycle] ( docs/component-lifecycle.md )
30+ - [ store recovery] ( docs/store-recovery.md )
31+ - [ action/store transitions] ( docs/action-store-transitions.md )
32+
1033The current design deliberately separates two kinds of state:
1134
1235- domain state lives in the application ` model ` and changes through typed
@@ -472,8 +495,14 @@ diffing, and patch planning remain in Koka.
472495- ` explore/react/action.kk ` : serializable action codecs, envelopes, and the
473496 observation effect.
474497- ` explore/react/state.kk ` : component scopes, typed stores, listeners, effects,
475- snapshots, and runtime handlers.
498+ and lifecycle authoring.
499+ - ` explore/react/runtime.kk ` : host-only registered callback execution,
500+ scheduled effects, and snapshot transport.
501+ - ` explore/react/inspection.kk ` : read-only VDOM/event-registry/runtime queries
502+ for tests and devtools.
476503- ` explore/react/renderer.kk ` : rendering, diffing, and patch planning.
504+ - ` docs/quick-start.md ` and ` docs/component-authoring.md ` : progressive
505+ component tutorial and the compact preferred API.
477506- ` demo/* ` : application shell, features, actions, stores, and workflows.
478507- ` demo/runtimeframe.kk ` : pairs the domain model with the framework runtime tree
479508 and runs render/action transitions at the app boundary.
0 commit comments