Updated README as repeat is not directly supported by newest CLJS (closes #166)

This commit is contained in:
Nikita Prokopov
2019-05-28 15:45:31 +03:00
parent e450a65707
commit 93f9e22d86

View File

@ -165,7 +165,7 @@ Given this code:
(require [rum.core :as rum])
(rum/defc repeat-label [n text]
[:div (repeat n [:.label text])])
[:div (vec (repeat n [:.label text]))])
```
First, we need to create a component instance by calling its function:
@ -262,7 +262,7 @@ If your component accepts only immutable data structures as arguments, it may be
```clojure
(rum/defc label < rum/static [n text]
[:.label (repeat n text)])
[:.label (vec (repeat n text))])
```
`rum.core/static` will check if the arguments of a components constructor have changed (using Clojures `-equiv` semantic), and if they are the same, avoid re-rendering.