📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials React Modern Development Components

Components

5 min read Quiz at the end
A component is a function that returns JSX. Names must start with a capital letter. Use them like HTML tags: <Button />. Small components compose into larger UI sections, making code reusable and easy to maintain.

React Components

// Function component
function Greeting({ name }) {
  return 

Hello, {name}!

; } // Arrow component const Button = ({ label, onClick }) => ( ); // Using components function App() { return (
); }
Sign in to track your progress.
Topic Quiz · 5 questions

Test your understanding before moving on

1. What is a React component?
💡 React components are reusable, independent pieces of UI.
2. Function components return:
💡 Function components must return JSX (or null to render nothing).
3. How do you use a component?
💡 Components are used in JSX as HTML-like tags: <ComponentName />.
4. Component names must be:
💡 React components must start with an uppercase letter to distinguish from HTML tags.
5. What is composition in React?
💡 Composition means building complex UIs from smaller, reusable components.