Function Components in React

From the React Components & JSX cheat sheet · Component Essentials · verified Jul 2026

Function Components

Modern way to create React components

javascript
// Simple function component
function Welcome() {
  return <h1>Hello, World!</h1>
}

// Arrow function syntax
const Welcome = () => {
  return <h1>Hello, World!</h1>
}

// Using the component
function App() {
  return (
    <div>
      <Welcome />
      <Welcome />
    </div>
  )
}
🟢 Essential - Use function components for all new code
💡 Component names must start with capital letter
📌 Returns JSX to describe the UI
componentsessential

More React tasks

Back to the full React Components & JSX cheat sheet