workflo.macros.jscomponents

camelize-keys

defjscomponent*

(defjscomponent* module name)

defjscomponents

macro

(defjscomponents module)

Defines ClojureScript functions of the form

(defn <component-name> [props & children]
  (js/React.createElement js/<module>.<ComponentName>
    (clj->js props)
    ... children ..))

for all component names listed in the file .json in the classpath.

This allows to integrate an entire JavaScript React component library into a ClojureScript project (e.g. using Om Next) with a single (defjscomponents ComponentLibraryName) expression and a ComponentLibraryName.json file.

defjscomponents*

(defjscomponents* module)