What Is React and When Should You Use It?
React is a JavaScript library for building user interfaces from reusable components. Learn what React is, how it works, and when it is the right tool for a project.
Build modern UIs with React
React is a JavaScript library for building user interfaces from reusable components. Learn what React is, how it works, and when it is the right tool for a project.
Scaffold a new React project with Vite in minutes. Follow the exact command, choose the React template, install dependencies, and start the development server.
Understand every file and folder in a new Vite React project. Learn what index.html, main.jsx, App.jsx, package.json, and vite.config.js each do.
See the same counter built with plain JavaScript and with React. Learn what React changes about how you update the UI and why the difference matters.
Stop a React event from bubbling to parent handlers by calling e.stopPropagation() inside the handler. Learn when to use it and what it does not do.
Learn how the useReducer Hook manages state through a pure reducer function, how to dispatch actions, and when the pattern beats useState.
Learn the steps to extract repeated stateful logic into a reusable custom Hook, name it correctly, and call it from any component.
Understand why custom Hooks share behavior, not values, and how each call to the same Hook keeps its own independent state.
Build a useMediaQuery Hook that tracks a CSS media query with matchMedia, updates on viewport changes, and drives responsive React layouts.
Model loading, error, empty, and success states in React with one status value. Show a clear, accessible message for every request outcome.
Cancel fetch requests in React with AbortController. Pass a signal to fetch, abort in the Effect cleanup, and tell aborts apart from real errors.
Learn how useQuery works in TanStack Query. Query keys identify data, the cache reuses results, and refetching keeps stale data fresh.