Q61. How do you implement intercepting routes in App Router?
Intercepting routes allow you to load a route from another part of your application while keeping the context of the current page, similar to modals. ``` app/ ├── feed/ │...
Technical Question Bank · Peer-Reviewed
Search and filter frequently asked interview questions across technical, programming, and behavioral domains. Tailor your interview preparation by difficulty for freshers or experienced developers (87 available).
Intercepting routes allow you to load a route from another part of your application while keeping the context of the current page, similar to modals. ``` app/ ├── feed/ │...
The `loading.js` file creates loading UI that shows instantly while route segments are loading. It automatically wraps the page and its children in a React Suspense bound...
You can create custom not-found pages using the `not-found.js` file. This file defines UI to render when the `notFound()` function is thrown within a route segment. ```js...
The `template.js` file is similar to `layout.js` but creates a new instance for each of its children on navigation. This means state is not preserved and effects are re-s...
Nested layouts are implemented by creating `layout.js` files in different route segments. Layouts are nested automatically based on the folder structure. ``` app/ ├── lay...
In the App Router, API routes are now called "Route Handlers" and use the `route.js` file convention instead of the pages-based approach. **Pages Router (API Routes)**: `...
The App Router has built-in support for streaming and React Suspense, allowing you to progressively render and stream UI to the client. ```jsx // app/page.js import { Sus...
Below are the main benefits of React Router V4 module, 1. In React Router v4(version 4), the API is completely about components. A router can be visualized as a single co...
React Server Components (RSC) are a new React feature that allows components to be rendered on the server. In the App Router, components are Server Components by default....
You can create error boundaries using the `error.js` file in a route segment. This file defines UI to render when an error is thrown within that segment. ```jsx // app/er...
HireXTech uses essential storage to remember your study preferences and third-party advertising cookies via Google AdSense in compliance with GDPR. You can choose to enable essential cookies only or accept all cookies. Read our Privacy Policy.