Components

React function component

A capitalized function that React can render as a component. A definition alone does not mount it. The example uses JSX and requires configured React tooling.

Formal Syntax & Structure

react syntaxreact
function ComponentName() { return <p>Text</p>; }

Return Value

React-renderable value

A UI description, such as a React element produced by JSX.

Working Example

Example Snippetreact
export default function BookTitle() {  return <h2>Field Guide</h2>;}
React Reference