Q21. How do fetch cache options work in the App Router?
The `fetch` API in server components supports caching controls via `{ next: { revalidate } }` and cache modes like `cache: 'no-store'` or `cache: 'force-cache'`. Use `no-...
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 (188 available).
The `fetch` API in server components supports caching controls via `{ next: { revalidate } }` and cache modes like `cache: 'no-store'` or `cache: 'force-cache'`. Use `no-...
Exporting `dynamic` controls how a route is rendered: `'force-dynamic'`, `'force-static'`, or `'auto'`. Use it to override Next.js detection — for example, force dynamic ...
In the App Router you can create a `head.js` or `head.tsx` file inside a route segment to return `` elements (title, meta, link) for that segment. This is preferred for c...
A hook that allows access to the router object and perform navigation. The `useRouter` hook allows you to programmatically change routes inside **client** components.
The `push` method adds a new entry to the browser's history stack, while `replace` replaces the current entry in the history stack. ```jsx const router = useRouter(); // ...
Using useRouter() hook. ```jsx const router = useRouter(); function handleClick() { router.push(`/path`); } Go There; jsx router.push(href: string, { scroll: boolean }) `...
Next.js provides built-in, zero-configuration TypeScript support out of the box: ### 1. In a New Project: Pass the `--typescript` flag when bootstrapping: ```bash npx cre...
A feature to create API endpoints in the `pages/api` or `app/api` directory. It allow you to create custom request handlers for a given route using the Web Request and Re...
The **`public`** directory located at the root of a Next.js project serves static assets directly from the root domain path without going through Webpack or build bundlin...
A feature to load components or modules dynamically. ```jsx const ComponentA = dynamic(() => import("../components/A")); const ComponentB = dynamic(() => import("../compo...
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.