Liking cljdoc? Tell your friends :D

hyper.reactive

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.
raw docstring

get-componentclj

(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.
sourceraw docstring

partial-renderclj

(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.
sourceraw docstring

render-componentclj

(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.
sourceraw docstring

setup-component-watches!clj

(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).
sourceraw docstring

setup-new-component-watches!clj

(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).
sourceraw docstring

sweep-stale-components!clj

(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.
sourceraw docstring

teardown-all-components!clj

(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.
sourceraw docstring

teardown-component-watches!clj

(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.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close