DataSeries
Published in

DataSeries

How to Use React Fragments to Return Multiple Elements in One Component

One common pattern in React apps is that you want to return multiple components in one element. Using fragments is the way to do this. When you wrap components inside a fragment, you do not add an extra DOM node outside the components that you want to render.

It is easy to use fragments, we just put:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store