Add some examples of extended Hiccup to the README

This commit is contained in:
Howard M. Lewis Ship 2015-06-25 08:39:10 -07:00
parent 3d6c2f5e3f
commit 91564be393

View File

@ -41,6 +41,20 @@ Reagent uses [Hiccup-like](https://github.com/weavejester/hiccup) markup instead
" text."]])
```
Reagent extends standard Hiccup in one way: it is possible to "squeeze" elements together by using a `>` character.
```clj
[:div
[:p
[:b "Nested Element"]]]
```
can be written as:
```clj
[:div>p>b "Nested Element"]
```
You can use one component inside another:
```clj