React Project Structure for Beginners: Files and Folders
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.
Build modern UIs with React
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.
Add React to an existing website without rewriting it. Install React, create a root, and render components inside your current HTML.
Derived state is any value you can compute during render. Do not store it, or two sources of truth will drift apart.
Type useState in React with TypeScript by letting inference work, or pass a type argument for unions, objects, and arrays.
Event handling is how a React component responds to user input. Attach onClick and onChange handlers, pass functions without calling them, and read the event object.
Read uncontrolled form values in React by letting the DOM hold them and collecting them with new FormData on submit. No per-field state required.
Event bubbling runs handlers from the target up to its parents, while capturing runs top-down. Learn how both directions work in React.
Make clickable elements accessible in React by using real buttons and links instead of divs with onClick. Native elements bring focus, keyboard, and roles for free.
Keyboard navigation in React uses Tab to move between components and arrow keys to move inside them. Learn the roving tabindex pattern.
Type React events and form handlers with the event types from @types/react. Most handlers infer the type, and you annotate only when extracting functions.
React context is built in, Redux Toolkit suits complex global state, and Zustand gives small stores without providers. Learn which fits your app.
Learn how useQuery works in TanStack Query. Query keys identify data, the cache reuses results, and refetching keeps stale data fresh.