Launch offer
Business website $150 USD Custom plugin $200 USD Ready in 5 days
Get a quote
React

JSX Syntax

Write JSX with one parent, className, and self-closing tags.

JSX Syntax — a practical guide to JSX syntax with clear examples you can reuse in real projects.

React Tutorial Series (11/103). Prefer one article? Read the complete React tutorial.

Short description

Use fragments `<>…</>` when you don’t want an extra DOM node.

JSX rules

return (
  <>
    <h1 className="title">Home</h1>
    <img src={url} alt="Hero" />
  </>
);