Table of Contents
React is a JavaScript library for building user interfaces from components. A component can be a button, a form, or a whole page. You describe what the component should display for its current inputs and state, and React updates the interface when that state changes.

How props, state, and events fit together
Props are inputs a parent passes to a component. State stores information that can change, such as a count or whether a panel is open. An event handler can request a state update. React then renders the component with the new value.
import { useState } from 'react';
export default function Counter({ label = 'Clicks' }) {
const [count, setCount] = useState(0);
return (
<button onClick={() => setCount(n => n + 1)}>
{label}: {count}
</button>
);
}
Here, the label is a prop and the count is state. The markup-like syntax is JSX. The React Quick Start introduces JSX, events, and shared state. You can practice the same pattern in the React Development course.
Where React fits alongside Vue and Angular

React centers on components and leaves decisions such as app routing and server rendering to other tools or frameworks. Vue can be adopted incrementally and offers a template-based approach. Angular provides a broader framework with conventions for common app features. Choose based on the existing codebase, team experience, accessibility needs, and how you’ll deploy the application.
When a React framework helps
React can power a widget embedded on an existing page, a client-rendered app, or a site that delivers HTML from the server. A framework can supply routing and prerendering for content pages. Search visibility still depends on whether important content is accessible and useful. Page speed depends on your code, data fetching, and delivery setup.

If you’re new to browser programming, start with JavaScript fundamentals so you can recognize which parts of a React example come from JavaScript itself.
Reader Comments 0
Sign in with email or Google to join the discussion.