Optional :let bindings initializes per-instance state. Existing form-2 bodies, destructured/variadic arguments, docstrings and metadata are supported. Use components in Hiccup, not as ordinary functions (Reagent 2 convention).
(defc
audio
visual

(<> component & args)Return a component vector. Module references use the lazy loader only until their code is available; direct components never acquire a loader wrapper. Use (<>
(<> component & args)Return a component vector. Module references use the lazy loader only until their code is available; direct components never acquire a loader wrapper. Use (<>
(defc name & decls)Define a lean Reagent 2 function component with optional composed features.
Plain definitions delegate directly to r/defc. An optional spec declaration map after the optional docstring declares :features and :depends. Features include :error-boundary, :props, :lifecycle, :links, and registered extensions. Merge-only features run inline with hooks; only error boundaries need classes. :appear and :seen merge onto a native root; :presence retains keyed :exit children until their exit animations finish.
:depends is a vector of data-source descriptors, or a function of component arguments returning that vector. Dependencies start before mount and can be explicitly prefetched with component/preload!. :data enables dependencies supplied through the first argument at runtime. Spec arguments are inferred from spec/opts/options bindings or destructured feature keys; domain-data arguments need no opt-out annotation.
For spec-capable components, the first Hiccup argument may be a spec map or an ordered feature vector: [
Optional :let bindings initializes per-instance state. Existing form-2 bodies, destructured/variadic arguments, docstrings and metadata are supported. Use components in Hiccup, not as ordinary functions (Reagent 2 convention).
(defc
(defc name & decls)Define a lean Reagent 2 function component with optional composed features.
Plain definitions delegate directly to r/defc. An optional spec declaration map after the optional docstring declares :features and :depends. Features include :error-boundary, :props, :lifecycle, :links, and registered extensions. Merge-only features run inline with hooks; only error boundaries need classes. :appear and :seen merge onto a native root; :presence retains keyed :exit children until their exit animations finish.
:depends is a vector of data-source descriptors, or a function of component arguments returning that vector. Dependencies start before mount and can be explicitly prefetched with component/preload!. :data enables dependencies supplied through the first argument at runtime. Spec arguments are inferred from spec/opts/options bindings or destructured feature keys; domain-data arguments need no opt-out annotation.
For spec-capable components, the first Hiccup argument may be a spec map or an ordered feature vector: [
Optional :let bindings initializes per-instance state. Existing form-2 bodies, destructured/variadic arguments, docstrings and metadata are supported. Use components in Hiccup, not as ordinary functions (Reagent 2 convention).
(defc
(defcomp- name & decls)Define a reagent component with a docstring and metadata, standardized arg parsing, but no extra functionality like error boundaries and such. Usage: (defcomp-
(defcomp- name & decls)Define a reagent component with a docstring and metadata, standardized arg parsing, but no extra functionality like error boundaries and such. Usage: (defcomp-
(defpage name & decls)A defc page declaration with a mandatory error boundary. Other features and dependencies compose as usual. An optional layout container encloses the boundary; :container false opts out for the site shell.
(defpage name & decls)A defc page declaration with a mandatory error boundary. Other features and dependencies compose as usual. An optional layout container encloses the boundary; :container false opts out for the site shell.
(for [id xs & ls] <c>)Like clojure.core/for, but non-lazy, and injects :key metadata into each item.
(for [id xs & ls] <c>)Like clojure.core/for, but non-lazy, and injects :key metadata into each item.
(hafn & body)Use in event-handlers instead of (fn e/_), returns nil so react doesnt get a false and ignore us
(hafn & body)Use in event-handlers instead of (fn e/_), returns nil so react doesnt get a false and ignore us
(make-modules base ks)Use keywords to generate Shadow lazy loadables. ks must be a literal seq of keywords at the call site.
(make-modules base ks)Use keywords to generate Shadow lazy loadables. ks must be a literal seq of keywords at the call site.
(register-render-functions!)Register namespace-local public legacy <…> functions without changing their identity or signature.
(register-render-functions!)Register namespace-local public legacy <…> functions without changing their identity or signature.