Closed
Description
Enhancement
Up to now when when we've been using render props in widgets we've used a by convention renderer
property. This kind of works for a single renderer, but not for many and because this is only by convention we can't for certain know what property is a render prop. In 7 we'd like to propose a change to our children behaviour to support named renderers, it would look something like:
<SplitPane>
{
{
left() => <div>Left Item</div>,
right() => <div>Right Item</div>
}
}
</SplitPane>
or
<SplitPane>
{
() => ({
left: <div>Left Item</div>,
right: <div>Right Item</div>
})
}
</SplitPane>
As part of this we might need to move children
to the properties interface to allow this to be inferred by TSX.
With this in place we should be able to write a better harness to deal with render props.