Ember has a powerful concept of yielding values to children. This is a way to pass values from
a parent component to a child component. This is useful when you want to pass values to a the contents of the children when composed.
Importantly it is flexible, allowing the child to access the values, or not.
This utility is a way to mimic the behavior of yield in React.
In ember, we have the ability to yield a value to the children. Done like so:
When used, it allows the child to access the values, or not, depending on the implementation:
In React, there is no built-in way to yield values to children natively. To solve for this we created this Yield component which mimics the behavior:
YieldThe Yield component is a way to yield values to children.
props: The value to yield to the children.children: The children to render. This can be a function that receives the yielded values, or not.YieldChildrenThe YieldChildren type is a way to type the children of the Yield component. Should be used to type the children of the component that uses the Yield component.