nextRound
TechnologiesCoding ProblemsBookmarksLearning PathsLogin
nextRound
TechnologiesCoding ProblemsBookmarksLearning PathsLogin
nextRound

AI-powered interview preparation platform. Practice with curated questions, mock interviews, and personalized learning paths to crack your dream tech interview.

Quick Links

  • Technologies
  • Mock Interviews
  • Saved Questions
  • Pricing

Company

  • About Us
  • Contact Us

Legal

  • Privacy Policy
  • Terms of Use

© 2026 nextRound. All rights reserved.

Questions
1 of 14
1Discuss react router?
2Implement declarative mode to implement router?
3Implement nested routes in declarative mode?
4What are layout routes and index routes?
5What are route prefixes?
6How can we handle dynamic segments of a route in declarative routing ?
7How to link to routes from components?
8Implement Data mode of routing?
9Implement nested routes in Data mode of routing?
10Implement Layout and Index routes in Data mode of routing?
11How to set a route prefix in data mode?
12Discuss route object?
13List important routing related hooks?
14What are different ways to redirect in react?
reactreact
Basics
JSX
Virtual DOM
Reconciliation
State and Props
Components
Class Components
Function Components
Lifecycle functions
Code Sharing
Hooks
useState
useReducer
useMemo
useContext
useCallback
useEffect
Custom Hooks
New Hooks
HOC
Refs
Data Sharing
Events
Context API
Redux
Router
CSR-SSR
React APIs
Performance Optimisation
ReactDOM
Strict Mode
Security
01 / 14

Discuss react router?

Difficulty: 5/10
basic routing, nested routes, protected routes

Routing in React is the process of managing navigation between different components or views within a single-page application (SPA). React uses React Router, a popular library, to handle routing and enable the dynamic rendering of components based on the URL.

There are three primary ways, or modes, to use it in your app, so there are three guides to get you started.
  1. 1

    Declarative: Declarative mode enables basic routing features like matching URLs to components, navigating around the app, and providing active states with APIs like <Link>, useNavigate, and useLocation.

  2. 2

    Data: By moving route configuration outside of React rendering, Data Mode adds data loading, actions, pending states and more with APIs like loader, action, and useFetcher.

  3. 3

    Framework: Framework Mode wraps Data Mode with a Vite plugin to add the full React Router experience.

Scenario Questions

0-2 years experience

  1. 1How would you set up a simple React Router configuration to navigate between a Home page and an About page?
  2. 2If you add a new <Route> but clicking its <Link> doesn’t change the URL, what could be causing that?

2-5 years experience

  1. 1We need a protected Dashboard route that only logged‑in users can see. Walk me through how you’d implement that with React Router.
  2. 2After upgrading to React Router v6, a nested route stopped rendering its child component. How would you debug the problem?
  3. 3When would you choose client‑side routing versus a server‑side redirect in a React application?

5-8 years experience

  1. 1Our app has dozens of routes and the bundle size is growing. How would you restructure routing to improve load performance?
  2. 2Explain how you’d combine React Router with code‑splitting and lazy loading for a feature‑rich app.
  3. 3We need deep linking into a modal that overlays the current page while preserving back navigation. How would you handle that with React Router?

8+ years experience

  1. 1Our organization is migrating a large legacy codebase from React Router v5 to v6 across multiple teams. What migration strategy would you propose to minimize risk and keep routing consistent?
  2. 2Design a routing architecture for a multi‑tenant SaaS platform where each tenant can have custom pages, and the system must support both client‑side navigation and server‑side rendering.
  3. 3How would you version route APIs to support backward compatibility without breaking existing users?

Follow-up Questions

  • What trade‑offs exist between using <Navigate> and programmatic navigation via the useNavigate hook?
  • How does React Router handle route matching order, and why does it matter?
  • Can you describe a scenario where you’d prefer server‑side redirects over client‑side routing?
Sharethis question

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.