Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Advanced - Initial Module Evaluation

Total questions: 24

Worksheet time: 24mins

Name
Class
Date
1.

When should a developer use the 'useEffect' hook in a Next.js application?

a)

To fetch data on the server-side during page rendering.

b)

To perform side effects in function components.

c)

To define custom server-side routes.

d)

To handle client-side form validations.

2.

What does SSR stand for in the context of Next.js?

a)
Server-Side Rendering
b)
Server-Side Reconciliation
c)
Single-Page Rendering
d)
Static Site Rendering
3.

You can use fetch with async/await in ​ (a)  

Choose from the below words
Server Components
Client Components
React Components
4.

What is the purpose of the 'getServerSideProps' function in Next.js?

a)

To fetch data at build time and pass it as props to the page component.

b)

To handle client-side form submissions.

c)

To define server-side routes for API calls.

d)

To create dynamic routes based on user input.

5.

What is the recommended way to define dynamic routes in a Next.js application?

a)

By creating separate route configuration files

b)

By modifying the .env file with dynamic routes

c)

Can be created by wrapping a folder's name in square brackets ([slug])

d)

By using regular expressions for route matching

6.

How do you configure routing in a Next.js application?

a)

By using the React Router library

b)

By creating a custom JavaScript function for routing

c)

By defining routes in the app directory using folders & page.tsx file

d)

By modifying the .env file

7.

Next.JS offers us some ways to navigate between routes, what component allows us to do this?

a)
Link
b)
Anchor
c)

Nav

d)
Button
8.
  • Pages are ​ (a)   by default but can be set to a ​ (b)   .

Choose from the below words
Server Components
Client Component
Layout Component
Template Component
9.

Abigail is working on a project using Next.JS and wants to enhance the user experience by pre-rendering loading indicators. Which special Next.JS file allows her to achieve this?

a)

_app.tsx

b)

loading.tsx

c)

pre-render.tsx

d)

layout.tsx

10.

Oliver is building a website and wants to add interactive user interface components. Which components should he use to write an interactive user interface that can be rendered on the client at request time?

a)

Server Components

b)

Client Components

c)

Layout Components

11.

How can Abigail use Route Groups in Next.js to organize her route segments and project files without affecting the URL path structure?

a)

By adding prefixes to the route paths in the 'pages' directory.

b)

By creating a folder and its name by placing it in parentheses (folder name)

c)

By using a separate 'routes' directory for organizing route segments and project files.

d)

By creating separate Next.js projects for each route segment and project file.

12.

Which components allow you to build a user interface that can be rendered and optionally cached on the server?

a)

Server Components

b)

Client Components

c)

React Components

13.

What type of component is most suitable for fetching data in a web application?

a)

Client Component

b)

Server Component

14.

Data can be revalidated on-demand by path (​ (a)   ) or by cache tag (​ (b)   ) inside a Route Handler or a Server Action

Choose from the below words
revalidatePath
revalidateTag
revalidateRoute
revalidateAll
15.

What type of component is best suited for adding interactivity and event listeners in a web application?

a)

Client Component

b)

Server Component

16.

Both static and dynamic metadata through generateMetadata are only supported in ​ (a)   Components.

Choose from the below words
Server
Client
Layout
17.

What directive is necessary to add at the top of a file to use Client Components?

a)

"use server"

b)

"useClient"

c)

"use client"

d)

"use react"

18.

What type of component is best suited to use custom hooks that depend on state, effects, or browser-only APIs?

a)

Client Component

b)

Server Component

19.
  • A ​ (a)   file is required to make a route segment publicly accessible.

Choose from the below words
page.tsx
layout.tsx
route.tsx
20.

To create a Server Action by defining it inside an asynchronous function, what directive should we add at the top of the function body?

a)

"use client"

b)

"use server"

c)

"apply server"

d)

"use action"

21.

How can a developer implement client-side routing in a Next.js application?

a)

By using the 'Link' component from the 'next/link' module.

b)

By manually updating the browser's URL using JavaScript.

c)

By defining routes in the 'server.js' file.

d)

By creating a separate 'routes' folder in the project directory.

22.

How can Next.js assist a website owner in enhancing their search engine optimization (SEO) efforts?

a)

It offers keyword suggestions

b)

It automatically generates backlinks

c)

It improves website performance

d)

It provides built-in SEO tools

23.

What is one advantage of using Next.js over React in a real-world scenario?

a)

Real-time collaboration features

b)

Native mobile app development support

c)

Server-side rendering

24.

Which of the following routes is correct to access the dynamic route from the browser defined in this NextJS application?