uix.compiler.react
Hiccup compiler that translates Hiccup into React.js at compile-time.
*cljs-env*
dynamic
*skip-check?*
dynamic
*skip-fn-check?*
dynamic
*specked-args*
dynamic
camel-case
(camel-case k)
Turns kebab-case keyword into camel-case keyword
camel-case-keys
(camel-case-keys m)
Takes map of attributes and returns same map with camel-cased keys
check-attrs
(check-attrs tag v attrs children expr)
compile-attrs
(compile-attrs attrs)
Takes map of attributes and returns same map with keys translated from Hiccup to React naming conventions
compile-config-kv
multimethod
compile-defui
macro
(compile-defui sym body)
Compiles Hiccup component defined with defui macro into React component
compile-element
multimethod
compile-form
multimethod
compile-html
(compile-html expr env)
Compiles Hiccup expr into React.js calls
compile-html*
(compile-html* expr)
empty-js-obj
form-name
(form-name form)
has-spec?
(has-spec? sym)
Checks if there’s a spec defined for sym
infer-type
(infer-type expr env)
Infers type of expr
inline-children
(inline-children type attrs children)
inline-element
(inline-element type attrs)
inlineable-types
join-classes
(join-classes classes)
Joins class names into a single string
join-classes-js
(join-classes-js)
(join-classes-js & xs)
Emits runtime class string concatenation expression
literal?
(literal? x)
maybe-check
(maybe-check x)
Wraps x with interpret call when x is not an argument of a specked function
maybe-interpret
macro
(maybe-interpret expr)
Infers type of expr and wraps expr with interpret call if the type is not one of the inlineable-types, otherwise returns expr
normalize-element
(normalize-element v)
(normalize-element v n)
Takes Hiccup element and optional index specifying position of attributes and returns a normalized element [tag attrs children]
parse-tag
(parse-tag hiccup-tag)
Takes Hiccup tag (:div.class#id) and returns parsed tag, id and class fields
re-tag
Hiccup tag pattern :div :.class#id etc.
set-id-class
(set-id-class props [_ id class])
Takes attributes map and parsed tag, and returns attributes merged with class names and id
to-js
multimethod
to-js-map
(to-js-map m)
unevaluated?
(unevaluated? expr)