diff options
Diffstat (limited to 'src/dompa')
| -rw-r--r-- | src/dompa/nodes.cljc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/dompa/nodes.cljc b/src/dompa/nodes.cljc index a434cf0..2453b88 100644 --- a/src/dompa/nodes.cljc +++ b/src/dompa/nodes.cljc @@ -109,9 +109,16 @@ (into [] ($->flat-xf) children)) (defmacro $ - "A helper that simplifies node creation. Particularly useful + "Creates a new node. Particularly useful where you need compile-time composition over run-time, like when - combined with the `defhtml` macro to create HTML string outputs." + combined with the `defhtml` macro to create HTML string outputs. + + Usage: + + ```clojure + ($ :div + ($ \"hello world\" )) + ```" [name & opts] `(if (string? ~name) {:node/name :dompa/text |
