Backwards-compatible shims for the reactive-component API.
Reactive components are now just one kind of subview — a render-bearing,
:on-change :partial region — managed by hyper.subview, the unified
per-tab sub-region lifecycle registry. This namespace preserves the
original public function names and arities so existing call sites
(hyper.core/reactive, hyper.server, hyper.test) keep working while
delegating all behaviour to hyper.subview.
New code should prefer hyper.subview directly.
Backwards-compatible shims for the reactive-component API. Reactive components are now just one kind of *subview* — a render-bearing, `:on-change :partial` region — managed by `hyper.subview`, the unified per-tab sub-region lifecycle registry. This namespace preserves the original public function names and arities so existing call sites (`hyper.core/reactive`, `hyper.server`, `hyper.test`) keep working while delegating all behaviour to `hyper.subview`. New code should prefer `hyper.subview` directly.
(get-component app-state* tab-id component-id)Retrieve a reactive component's registration from app-state.
Retrieve a reactive component's registration from app-state.
(partial-render app-state* tab-id component-id)Re-render a single reactive component and return the targeted-fragment HTML.
Re-render a single reactive component and return the targeted-fragment HTML.
(render-component app-state* tab-id component-id deps render-fn)(render-component app-state* tab-id key fallback-id deps render-fn)Render a reactive component during a full page render. Delegates to
subview/render-reactive! (a render-bearing, partial-on-change subview).
The 5-arity treats component-id as the fallback id (root :id still
wins); the 6-arity passes a key (path-scoped identity) that takes
precedence.
Render a reactive component during a full page render. Delegates to `subview/render-reactive!` (a render-bearing, partial-on-change subview). The 5-arity treats `component-id` as the fallback id (root `:id` still wins); the 6-arity passes a `key` (path-scoped identity) that takes precedence.
(setup-component-watches! app-state* tab-id component-id deps enqueue-partial!)Set up watches on a reactive component's deps (partial re-render on change).
Set up watches on a reactive component's deps (partial re-render on change).
(setup-new-component-watches! app-state* tab-id enqueue-partial!)Set up watches for reactive components that don't already have them.
Reactive components are partial-on-change, so only enqueue-partial! is
needed (no full-render trigger).
Set up watches for reactive components that don't already have them. Reactive components are partial-on-change, so only `enqueue-partial!` is needed (no full-render trigger).
(sweep-stale-components! app-state* tab-id live-component-ids)Remove reactive components not re-registered during the last full render.
Remove reactive components not re-registered during the last full render.
(teardown-all-components! app-state* tab-id)Remove all reactive components for a tab. Called on disconnect.
Remove all reactive components for a tab. Called on disconnect.
(teardown-component-watches! app-state* tab-id component-id)Remove watches and release refcounts for a reactive component's deps.
Remove watches and release refcounts for a reactive component's deps.
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 |