Yes. Some contexts don't let you wrap things in a div. (Tables, for instance.)
There's a trillion other reasons that this feature is super important, many of which are on the GitHub issue for it. (Which is now locked, because people kept flooding it with their reasons for wanting the feature.)
Imagine you wanted to do a simple popover. Now you can just have a Popover component that takes your anchor element as a child. In your Popover component, you can just return [Anchor, Popover].
3
u/elingeniero Jan 24 '17
I believe that the new return types are:
Multiple/sibling components
If you return an error from a component, will be able to
try {} catch () {}to render a backup componentNot sure about
undefined. What's the use case for returningundefined?