react

"mulling over state management stuff"
martinklepsch 2021-02-02T14:05:34.001800Z

Kind of a Rum/React question: what is the best way to pass a variable number of children into a component. We currently do something like below but I’m wondering if that might be problematic due to the hiccup interpretation?

(rum/defc Container [& children]
  (into [:div] children))

ordnungswidrig 2021-02-05T11:54:14.004900Z

What about react fragments? [:div [:<> children]] this is at least the reagent syntax. Not sure about run.

ordnungswidrig 2021-02-05T11:55:04.005100Z

Or did you refer to the varags in the function signature? :thinking-face:

2021-02-02T17:21:23.004700Z

I guess either both div and children or the whole into form will be wrapped with interpret call