A preview of what's in this quiz. Answer them interactively for instant scoring and full explanations.
Which company created and maintains Next.js?
1. Which company created and maintains Next.js?
- A.Meta (Facebook)
- B.Google
- C.Vercel
- D.Netlify
Which command is used to start the Next.js development server locally?
2. Which command is used to start the Next.js development server locally?
- A.next start
- B.next build
- C.next dev
- D.next run
What is Next.js?
3. What is Next.js?
- A.A database management extension for PostgreSQL
- B.A modern browser designed for web developers
- C.A React framework that enables server-side rendering and static site generation
- D.A styling library that compiles Sass into native React elements
Which command compiles the Next.js application for production usage?
4. Which command compiles the Next.js application for production usage?
- A.next start
- B.next dev
- C.next build
- D.next compile
Which command is used to run the compiled production build of a Next.js server?
5. Which command is used to run the compiled production build of a Next.js server?
- A.next dev
- B.next run
- C.next start
- D.next serve
What port does the Next.js development server run on by default?
6. What port does the Next.js development server run on by default?
How does Next.js handle routing by default?
7. How does Next.js handle routing by default?
- A.Using a central routing configuration file named routes.js
- B.Using React Router DOM imports exclusively inside App.js
- C.File-system routing, where file paths determine URL paths
- D.Routing is configured strictly in the next.config.js file
Which Next.js 13+ router structure introduces layout-based nesting under the `app/` directory?
8. Which Next.js 13+ router structure introduces layout-based nesting under the `app/` directory?
- A.Pages Router
- B.Layout Router
- C.App Router
- D.System Router
In the App Router, what must the main page component file of a route be named?
9. In the App Router, what must the main page component file of a route be named?
- A.index.js
- B.route.js
- C.page.js
- D.layout.js
By default, what type of React components are all files inside the App Router (`app/` directory)?
10. By default, what type of React components are all files inside the App Router (`app/` directory)?
- A.React Client Components
- B.Class-based Components
- C.React Server Components
- D.Static HTML elements only
In the App Router, what file is used to define a shared layout structure for nested route pages?
11. In the App Router, what file is used to define a shared layout structure for nested route pages?
- A.page.js
- B.template.js
- C.layout.js
- D.index.js
In the Pages Router, what URL path corresponds to the file `pages/about.js`?
12. In the Pages Router, what URL path corresponds to the file `pages/about.js`?
- A./pages/about
- B./about.js
- C./about
- D./index/about
How do you create a dynamic route (e.g. mapping to `/post/1`, `/post/2`) in the Next.js Pages Router?
13. How do you create a dynamic route (e.g. mapping to `/post/1`, `/post/2`) in the Next.js Pages Router?
- A.By adding a colon to the filename, e.g. :id.js
- B.By placing the file in a folder named dynamic
- C.By enclosing the filename in square brackets, e.g. [id].js
- D.By exporting a list of ids from next.config.js
In the Pages Router, what file corresponds to the root route (`/`) of the application?
14. In the Pages Router, what file corresponds to the root route (`/`) of the application?
- A.pages/root.js
- B.pages/home.js
- C.pages/index.js
- D.pages/main.js
Can React Server Components directly use hooks like `useState` or `useEffect`?
15. Can React Server Components directly use hooks like `useState` or `useEffect`?
- A.Yes, if they are defined inside an async function.
- B.Yes, but only if they are loaded dynamically.
- C.No, hooks can only be used in Client Components.
- D.Yes, React Server Components support all React hooks natively.
What does SSR stand for in the context of Next.js?
16. What does SSR stand for in the context of Next.js?
- A.Static Site Recovery
- B.Single Site Router
- C.Server-Side Rendering
- D.Server Static Redirect
Which built-in component is used in Next.js to navigate between pages with client-side routing?
17. Which built-in component is used in Next.js to navigate between pages with client-side routing?
- A.NavLink from 'react-router-dom'
- B.a tag with client attribute
- C.Link from 'next/link'
- D.Navigate from 'next/router'
What is the configuration file for Next.js options (such as custom routes, headers, or image domains)?
18. What is the configuration file for Next.js options (such as custom routes, headers, or image domains)?
- A.tsconfig.json
- B.package.json
- C.next.config.js
- D.next.settings.json
What is the primary benefit of using Next.js `Link` instead of a standard HTML `<a>` tag?
19. What is the primary benefit of using Next.js `Link` instead of a standard HTML `<a>` tag?
- A.It automatically converts text links into image links.
- B.It translates the destination pages into multiple languages.
- C.It prefetches linked pages and performs client-side transitions without a full page reload.
- D.It is required to load CSS styles correctly on the target page.
Which string directive must you write at the very top of a file to declare a React component as a Client Component in the App Router?
20. Which string directive must you write at the very top of a file to declare a React component as a Client Component in the App Router?
- A."use client-side"
- B."enable hooks"
- C."use client"
- D."use react"
Looking for a different topic? Browse all subjects