Q261. What is fallback in getStaticPaths?
Determines how to handle missing paths, with true, false, or 'blocking'. ```jsx export async function getStaticPaths() { const paths = await getAllPostIds(); return { pat...
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 (780 available).
Determines how to handle missing paths, with true, false, or 'blocking'. ```jsx export async function getStaticPaths() { const paths = await getAllPostIds(); return { pat...
JSON (JavaScript Object Notation) is a lightweight format that is used for data interchanging. It is based on a subset of JavaScript language in the way objects are built...
By creating files in the `pages/api` directory, which will be treated as API endpoints. ```jsx // pages/api/hello.js export default function handler(req, res) { res.statu...
Below are the list of syntax rules of JSON 1. The data is in name/value pairs 2. The data is separated by commas 3. Curly braces hold objects 4. Square brackets hold arra...
By creating a `_error.js` file in the `pages` directory. ```jsx // pages/_error.js export default function Error({ statusCode }) { return ( {statusCode ? `An error ${stat...
When sending data to a web server, the data has to be in a string format. You can achieve this by converting JSON object into a string using stringify() method. ```javasc...
Yes, the Pages Router has some limitations compared to the App Router, such as: - Limited support for nested routes and layouts. - Less flexibility in handling server com...
When receiving the data from a web server, the data is always in a string format. But you can convert this string value to a javascript object using parse() method. ```ja...
By using libraries like `next-auth` or implementing custom authentication logic in API routes. ```jsx // pages/api/auth/[...nextauth].js import NextAuth from "next-auth";...
When exchanging data between a browser and a server, the data can only be text. Since JSON is text only, it can easily be sent to and from a server, and used as a data fo...
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.