Fragment lets you group a list of children elements without adding an extra node to the DOM.
as you know It works fine.
when you see in inspect:
You have an additional div tag
That why React.Fragment concept is coming to the picture:
So now it works fine
when you see in inspect there is not additional div.
Top comments (0)