If you remember nothing else: a React component is a function that returns elements. JSX is the convenience that lets you describe those elements as HTML-shaped expressions instead of nested function calls.
Function in, element out
A function component takes one argument — its props object — and returns a React element (or a fragment, or null, or an array of elements). That's the entire contract. No class inheritance, no lifecycle methods you have to override, no this.
React calls your function whenever it needs to know what your component would render right now. The output is a description of the UI, not the UI itself. React's reconciler compares descriptions and decides which DOM mutations to perform.
JSX desugars to function calls
JSX is not part of JavaScript. The Vite + React plugin (via Babel or SWC under the hood) transforms JSX into jsx() / jsxs() calls from react/jsx-runtime. You almost never write those calls directly, but knowing they exist demystifies error messages that mention them.
What a fragment is
<>...</> (the empty-tag shorthand) is a fragment. It groups children without adding a DOM wrapper. Use it when a component needs to return multiple sibling elements and a parent <div> would pollute the layout.
The conditional patterns
Three idioms cover 95% of conditional rendering:
{condition && <Foo />}— render Foo only when condition is truthy.{condition ? <A /> : <B />}— pick one.{items.map(item => <Row key={item.id} {...item} />)}— render a list.
The list one needs a key. The key tells React's reconciler 'this element corresponds to that previous element' so it can move/update instead of remount.
The 0/false rendering pitfall
{count && <Badge />} when count === 0 renders the literal number 0 in the DOM (because 0 is falsy and short-circuit returns 0, and React renders numbers as text). Use {count > 0 && <Badge />} or {Boolean(count) && <Badge />} instead.