How would I create a react element and store it in...
# react
o
How would I create a react element and store it in a variable instead of adding to the children of the component currently being rendered? I basically want to do the equivalent of this in JSX:
const x = <div>Hello</div>
and then later use
x
somewhere in my component.
s
you can create it like this
val x = div.create { +"Hello" }
and add it with
+x
o
Thanks!