Careeroza
What is React?
React is a JavaScript library for building user interfaces. It was created at Facebook (Meta) and is now open source. You describe what the screen should look like for the current data, and React works out how to update the browser page.
- Component based: the UI is split into small reusable pieces (Navbar, Button, Card).
- Declarative: you write what the UI should be, not step-by-step DOM changes.
- JSX: HTML-like syntax inside JavaScript.
- One-way data flow: data goes from parent to child through props.
Your First Component
Example
A component is a function that returns JSX. React shows whatever it returns.
export default function App() {
return <h1>Hello, React!</h1>;
}Result