¡GoConqr estrena diseño! Cuéntanos qué te parece.

Módulo 10 de 28 · Multimedia

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.

Instrucciones

Para avanzar en el curso, envía un intento de este test. Puedes enviarlo después de la última pregunta.

Ir al módulo elegido

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?