[Question] type check JSX children to be a specific component/type
neo opened this issue · comments
Wenchen Li commented
So if I want to define children
(or any other prop) to take only a specific component (that I make), is it possible?
An example would be if I have a list component and an item component, and list should only accept an array of the item component...
Thank you!!
swyx.io commented
not possible, sorry. https://twitter.com/ryanflorence/status/1085745787982700544 let me know if you find otherwise
Wenchen Li commented
what a sad conclusion... 😭 thank you for pointing out tho!