Skip to main content

Navigation for Reacts

Navigation in a React app is client-side routing, where a router such as React Router maps URLs to components without full page reloads. It covers nested routes, URL parameters, redirects and protected routes, which together make up authentication flows like login, token storage and guarded pages.

Stage: Data and Routing · Part of the React roadmap · Last reviewed 19 November 2026

What to learn in Navigation

Navigation interview questions

How does client-side routing differ from normal page navigation?

The router intercepts link clicks, updates the URL with the History API and renders the matching component without requesting a new HTML page. This keeps app state and is faster, but the server must still serve the app for deep links.

Where should an authentication token be stored in a React app?

Avoid localStorage for sensitive tokens because scripts can read it during an XSS attack. An HttpOnly, Secure cookie set by the server is safer, since JavaScript cannot access it. Pair it with CSRF protection and short expiry.

Where Navigation fits in the React roadmap

Navigation belongs to the Data and Routing stage (intermediate level), which takes about 25 hours. Connect to the world.

Back to the full React roadmap