What is React.Fragment, and why is it used?

React.Fragment is a wrapper that lets you group multiple elements without adding extra nodes to the DOM. It helps avoid unnecessary <div>s in the DOM tree.

<React.Fragment>
  <h1>Hello</h1>
  <p>This is a Fragment</p>
</React.Fragment>