Skip to content

Commit

Permalink
Update creating-elements.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lilactown committed Sep 20, 2023
1 parent ecaafdb commit c085f2d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/creating-elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ with that same information, like [React.createElement](https://reactjs.org/docs/
($ my-component {:data {:foo "bar"}} "red text in a div")
;; => #js {:type my-component :props #js {:data {:foo "bar"}}}

($ my-component ($ "div" "first")
($ "div" "second"
($ "span" "last")))
($ my-component
($ "div" "first")
($ "div"
"second"
($ "span" "last")))
;; => #js {:type my-component
;; :props #js {:children #js [#js {:type "div"
;; :props #js {:children "first"}}
Expand Down

0 comments on commit c085f2d

Please sign in to comment.