`::h/for` could support `:index`
tatut opened this issue · 0 comments
tatut commented
If you need an running index number, you usually need to add map-indexed
around your data to assoc
it.
For could support it automatically by specifying a symbol.
Example of use with this feature:
[:ul
[::h/for [{:item/keys [name]} (fetch-my-items db)
:index i]
[:li {:class (if (even? i) "eden" "odd)} name]]]