React 16.2 now support a new fragment component, which is great for styled jsx. I think Babel needs an update to use it with next.js as <>.
https://reactjs.org/blog/2017/11/28/react-v16.2.0-fragment-support.html
Very cool! Yes, we'll have to wait until next core moves to babel@7.
Unfortunately, support for Babel 6.x is not available, and there are currently no plans to backport.
However, this looks awesome, and we can use <Fragment /> in the meantime, and transform later (from the link you shared):
const Fragment = React.Fragment;
<Fragment>
<ChildA />
<ChildB />
<ChildC />
</Fragment>
// This also works
<React.Fragment>
<ChildA />
<ChildB />
<ChildC />
</React.Fragment>
More info on Babel 7 here: #2654
Thank you for sharing, as I was unaware of this update!
This issue can be closed.
agreed 馃槃
Most helpful comment
Very cool! Yes, we'll have to wait until
nextcore moves tobabel@7.However, this looks awesome, and we can use
<Fragment />in the meantime, and transform later (from the link you shared):More info on Babel 7 here: #2654
Thank you for sharing, as I was unaware of this update!