DEV Community

React 16 and 16.2 Overview - Fragments, Portals and Error Boundaries

Ben Mildren on December 21, 2017

React 16 (and 16.2) adds some nice quality of life changes along with some performance gains. Return types and Fragments There's a whole slew o...
Collapse
 
nickytonline profile image
Nick Taylor • Edited

Nick Graf gives a nice overview of some these new features in these free egghead.io videos:

He explains portals as well, but in his pro course.

Collapse
 
nickytonline profile image
Nick Taylor • Edited

I'd also mention for those starting with React 16, why the error boundaries component needs to be a class instead of a stateless functional component. componentDidCatch is a life cycle method and life cycle methods are currently only supported in class components.

Collapse
 
barrymichaeldoyle profile image
Barry Michael Doyle

Great article! Heads up, there's a typo in the Portal section where you wrote styled components. :)

Collapse
 
mildrenben profile image
Ben Mildren

Thanks! changed it.

Collapse
 
ardennl profile image
Arden de Raaij

Thanks for the overviews, this is really useful. Especially fragments look like something I'll be applying right away!