You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working with a similar library rum, the hiccup-style vector is forgiving when having a nested vector, and will concatenate the first-depth of the nested vector
ex.
;; ....
[:div
[:div"first element"]
[[:div"second element"] [:div"third element"]]] ;; note the nested elements in the vector;; before being rendered, the structure takes the form of:
[:div
[:div"first element"]
[:div"second element"]
[:div"third element"]
This improves the expressiveness when constructing forms by allowing multiple forms to be included in a conditional form
;; ....
[:div
[:div"some element"]
(if truthy-stmt
[[:div"true"] [:div"foo"]] ;; note that the two elements are wrapped in a vector
[[:div"false"] [:div"bar"]])]
;; before being rendered, the structure takes the form of either;; truthy
[:div
[:div"some element"]
[:div"true"]
[:div"foo"]]
;; falsy
[:div
[:div"some element"]
[:div"false"]
[:div"bar"]]
Alternatively, an explicit concatentation keyword could be introduced to express intent:
;; ....
[:div
[:div"first element"]
[:& ;; note the use of `:& to represent concatenation
[:div"second element"]
[:div"third element"]]]
;; when rendered:
[:div
[:div"first element"]
[:div"second element"]
[:div"third element"]
I feel like this functionality can be a great way to improve many situations where multiple forms need to be concatenated, and remove unnecessary :div wrappers that lead to difficult css styling issues that are imposed when working with nested DIVs.
Please consider my enhancement, thank you,
Ben. Z
The text was updated successfully, but these errors were encountered:
When working with a similar library rum, the hiccup-style vector is forgiving when having a nested vector, and will concatenate the first-depth of the nested vector
ex.
This improves the expressiveness when constructing forms by allowing multiple forms to be included in a conditional form
Alternatively, an explicit concatentation keyword could be introduced to express intent:
I feel like this functionality can be a great way to improve many situations where multiple forms need to be concatenated, and remove unnecessary
:div
wrappers that lead to difficult css styling issues that are imposed when working with nested DIVs.Please consider my enhancement, thank you,
Ben. Z
The text was updated successfully, but these errors were encountered: