Routing
Give your React app real URLs: client-side routing, React Router 8, params and search params, nested layouts, loaders and actions, guards and navigation UX.
Until now every app in this course lived at one address. Real apps have many pages: a home page, a product page for every product, a settings page, a login page. Each page needs its own URL (web address), so people can bookmark it, share it, refresh it and press the Back button. Routing is the job of choosing what to show for each URL. In a React app it happens in the browser, without loading a new HTML page, and that is called client-side routing.
This phase starts with how that works underneath (the browser's History API, why the server must send index.html for every path) and then teaches React Router 8, the most used routing library for React: Routes, Route, Link and NavLink; dynamic segments like /products/:id; search params for filters; nested layouts with <Outlet />; and data routers, where each route loads its own data with a loader and saves forms with an action before the page renders.
It ends with the parts that make routing feel professional: protected pages that send logged-out users to a login page and back, loading route code only when needed, scroll position, moving keyboard focus and updating the page title after every navigation. The live examples use memory routers because they run inside a small frame on this page; each one shows its current URL in a little address bar so you can watch navigation happen.
Practise this phase
Hands-on exercises: write the code, see your page live, and press Check to have it tested automatically.