Six components, one concept each, in bases/examples/src/taia/ds/examples/components/. Run them:
bb dev # prints the examples URL
There is no route for the examples page: the page is itself a component, home.home, and a GET
on its own INIT route — /ds/nds/home.home/home/init?example=counter — renders it. start!
returns that URL. It keeps the user and the example's name in :memory, resolves the registry
entry into ctx, and
mounts the example's component in a div whose data-init fires the child's INIT:
stateDiagram-v2
direction LR
[*] --> index : INIT [no example]
[*] --> example : INIT [known example] / remember, lookup
[*] --> not_found : INIT / remember
Every example page ends with a live view of the component's :state and :memory — exactly what
round-trips through the signal store, refreshed on every event. Every example has an article here
and an executable spec in
examples_test.clj.
| | Shows | Component |
|-|-------|-----------|
| 1 · Counter | one-shot events, :memory round-trip, the render fn as the single source of markup | basics.counter |
| 2 · Live counter | a connected component: SSE stream, server-owned state, send-ui! + :broadcast | live.live-counter |
| 3 · Signup form | data-bind form signals, guarded transitions, an effects list with :execute-script | signup.signup |
| 4 · Wizard | hierarchical states, relative targets, machine-wide RESET, :invoke with on-done / on-error | wizard.wizard |
| 5 · TodoMVC | query-string params, filters, inline editing, keyboard expressions | todomvc.todomvc |
| 6 · Weather | an invoke calling a public API, lazy-load skeleton, data-indicator, the error path | weather.weather |
The application around them — the /ds routes, middleware, the server — is
core.clj; the page that mounts them is the
home component and the
registry sits in its controller.
It is the reference for your own base.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |