Question Bank

1899 approved questions from the community

What is the purpose of the `notFound()` function in Next.js?

MEDIUM
SINGLE CHOICE
30s
Next.js
by Mohamed

What is the purpose of catch-all segments in Next.js routing?

MEDIUM
SINGLE CHOICE
35s
Next.js
by Mohamed

How do you optimize fonts in Next.js?

MEDIUM
SINGLE CHOICE
30s
Next.js
by Mohamed

How do you handle redirects in Next.js?

MEDIUM
SINGLE CHOICE
30s
Next.js
by Mohamed

What is the purpose of `next/script` in Next.js?

MEDIUM
SINGLE CHOICE
30s
Next.js
by Mohamed

What is the difference between `layout.js` and `template.js` in the App Router?

MEDIUM
SINGLE CHOICE
35s
Next.js
by Mohamed

What is the purpose of the `error.js` file in the App Router?

MEDIUM
SINGLE CHOICE
35s
Next.js
by Mohamed

What is the purpose of the `loading.js` file in the App Router?

MEDIUM
SINGLE CHOICE
35s
Next.js
by Mohamed

What is the purpose of the `'use server'` directive in Next.js?

MEDIUM
SINGLE CHOICE
30s
Next.js
by Mohamed

What is the purpose of the `'use client'` directive in Next.js?

MEDIUM
SINGLE CHOICE
30s
Next.js
by Mohamed

What is Static Site Generation (SSG) in Next.js?

MEDIUM
SINGLE CHOICE
35s
Next.js
by Mohamed

What is the difference between `router.push()` and `router.replace()` in Next.js?

MEDIUM
SINGLE CHOICE
35s
Next.js
by Mohamed

How do you add component-level CSS in Next.js?

MEDIUM
SINGLE CHOICE
30s
Next.js
by Mohamed

What is `getStaticProps` used for in Next.js Pages Router?

MEDIUM
SINGLE CHOICE
35s
Next.js
by Mohamed

What is `getServerSideProps` used for in Next.js Pages Router?

MEDIUM
SINGLE CHOICE
35s
Next.js
by Mohamed

What is `getStaticPaths` used for in Next.js?

MEDIUM
SINGLE CHOICE
35s
Next.js
by Mohamed

What is the difference between `_app.js` and `_document.js` in Next.js?

MEDIUM
SINGLE CHOICE
35s
Next.js
by Mohamed

Global CSS in Next.js can only be imported in the _app.js or layout.js file.

MEDIUM
TRUE FALSE
25s
Next.js
by Mohamed

How do you create API endpoints in Next.js?

MEDIUM
SINGLE CHOICE
30s
Next.js
by Mohamed

How do you handle internationalization (i18n) in Next.js?

MEDIUM
SINGLE CHOICE
35s
Next.js
by Mohamed
PreviousPage 48 of 95Next