What is the purpose of React Fragments ( )?

React Developer Easy

React Developer — Easy

What is the purpose of React Fragments ( )?

Key points

  • Fragments prevent unnecessary div nesting
  • They improve code readability by grouping elements logically
  • Fragments do not add extra nodes to the DOM

Ready to go further?

Related questions