CodeZettaInterview Hub

React · Components · Fresh / Intern · Concept

What are fragments and why use them?

Short Interview Answer

<>...</> groups children without an extra DOM node.

Detailed Explanation

Useful when a component must return multiple siblings. Keys still needed on lists of fragments when mapping.

Did you know this answer?