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
classMyComponent < React::Component::Baseparam:footype: React::Element
...
end
we should then be able to say
MyComponent(div { "hello"}) instead of MyComponent(div {"hello"}.as_node)
This may not be easily implementable but it sure would be nice. I'm just not sure if apply as_node inside of another components' validator will work, because by that time we may not know the rendering context.
Furthermore if the param is any other type that responds to to_s we should automatically convert it (by doing a .to_s.span) This we can easily do.
The text was updated successfully, but these errors were encountered:
Looks like we are sort of already doing this in 0.7... any Elements passed to other other elements are automatically removed from the rendering buffer.
given this:
we should then be able to say
MyComponent(div { "hello"})
instead ofMyComponent(div {"hello"}.as_node)
This may not be easily implementable but it sure would be nice. I'm just not sure if apply as_node inside of another components' validator will work, because by that time we may not know the rendering context.
Furthermore if the param is any other type that responds to
to_s
we should automatically convert it (by doing a.to_s.span
) This we can easily do.The text was updated successfully, but these errors were encountered: