Components and Props

Components let you split the UI into independent, reusable pieces, and think about each piece in isolation. This page provides an introduction to the idea of components

Function and Class Components
Hello, Sohel

Hello, Rabeya

Composing Components

Components can refer to other components in their output. This lets us use the same component abstraction for any level of detail. A button, a form, a dialog, a screen: in React apps, all those are commonly expressed as components.

Hello, Mukul
Hello, Juwel
Hello, Russel
Extracting Components

Don’t be afraid to split components into smaller components.

Hello Kitty
Hello Kitty
I hope you enjoy learning React!
6/30/2025
Props are Read-Only

Whether you declare a component as a function or a class, it must never modify its own props.