GoConqr has a new look! Let us know what you think.

Module 10 of 28 · Media

React fragments

Kostas Diakogiannis

React fragments

React Fragments

What if you don't want to literally return a div or a specific element that has a meaning to HTML, but just a wrapper? Well, React gives you this opportunity with React.Fragment. That acts like a wrapper but will be ignored during compile phase from the browser.

At the end, it will not take any place, or space and it will not mount to the DOM at all.

You can place them by wrapping everything you want in an opening and closing tag respectively as the code above suggests.

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?