DEV Community

Shehraz arain
Shehraz arain

Posted on • Edited on

React.Fragment understand with simple words

Fragment lets you group a list of children elements without adding an extra node to the DOM.

as you know It works fine.

Alt Text

when you see in inspect:
You have an additional div tag

Alt Text

That why React.Fragment concept is coming to the picture:
So now it works fine
Alt Text

when you see in inspect there is not additional div.

Top comments (0)