Hicada - Hiccup compiler aus dem Allgaeu
NOTE: The code for has been forked like this: weavejester/hiccup -> r0man/sablono -> Hicada -> rumext
Hicada - Hiccup compiler aus dem Allgaeu NOTE: The code for has been forked like this: weavejester/hiccup -> r0man/sablono -> Hicada -> rumext
(compile content)(compile content opts)(compile content opts handlers)(compile content opts handlers env)Arguments:
React Native special recommended options: o :no-string-tags? - Never output string tags (don't exits in RN) o :default-ns - Any unprefixed component will get prefixed with this ns.
Arguments:
- content: The hiccup to compile
- opts
o :array-children? - for product build of React only or you'll enojoy a lot of warnings :)
o :create-element 'js/React.createElement - you can also use your own function here.
o :wrap-input? - if inputs should be wrapped. Try without!
o :rewrite-for? - rewrites simple (for [x xs] ...) into efficient reduce pushing into
a JS array.
o :emit-fn - optinal: called with [type config-js child-or-children]
o :camelcase-key-pred - defaults to (some-fn keyword? symbol?), ie. map keys that have
string keys, are NOT by default converted from kebab-case to camelCase!
o :transform-fn - Called with [[tag attrs children]] before emitting, to get
transformed element as [tag attrs children]
React Native special recommended options:
o :no-string-tags? - Never output string tags (don't exits in RN)
o :default-ns - Any unprefixed component will get prefixed with this ns.
- handlers:
A map to handle special tags. See default-handlers in this namespace.
- env: The macro environment. Not used currently.(compile* content)Pre-compile data structures
Pre-compile data structures
(compile-attrs attrs)Compile a JSX attributes map.
Compile a JSX attributes map.
(compile-element [tag attrs & children :as element])Returns an unevaluated form that will render the supplied vector as a HTML element.
Returns an unevaluated form that will render the supplied vector as a HTML element.
Pre-compile certain standard forms, where possible.
Pre-compile certain standard forms, where possible.
(emit-react tag attrs children)Emits the final react js code
Emits the final react js code
(tag->el x)A :div is translated to "div" and symbol 'ReactRouter stays.
A :div is translated to "div" and symbol 'ReactRouter stays.
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 |