Question Bank
1899 approved questions from the community
What is the purpose of the `notFound()` function in Next.js?
What is the purpose of catch-all segments in Next.js routing?
How do you optimize fonts in Next.js?
How do you handle redirects in Next.js?
What is the purpose of `next/script` in Next.js?
What is the difference between `layout.js` and `template.js` in the App Router?
What is the purpose of the `error.js` file in the App Router?
What is the purpose of the `loading.js` file in the App Router?
What is the purpose of the `'use server'` directive in Next.js?
What is the purpose of the `'use client'` directive in Next.js?
What is Static Site Generation (SSG) in Next.js?
What is the difference between `router.push()` and `router.replace()` in Next.js?
How do you add component-level CSS in Next.js?
What is `getStaticProps` used for in Next.js Pages Router?
What is `getServerSideProps` used for in Next.js Pages Router?
What is `getStaticPaths` used for in Next.js?
What is the difference between `_app.js` and `_document.js` in Next.js?
Global CSS in Next.js can only be imported in the _app.js or layout.js file.
How do you create API endpoints in Next.js?
How do you handle internationalization (i18n) in Next.js?