wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

MERN Stack Session 8 Quiz

Total questions: 12

Worksheet time: 6mins

Name
Class
Date
1.

What does %PUBLIC_URL% point to in React?

a)

Your app’s public folder

b)

Google’s Material Icons library

c)

The current URL/path of the app

d)

The location object

2.

What does the useLocation() hook return?

a)

The current route information

b)

A user object

c)

A location object

d)

A fallback default value

3.

What does the code in WElcome.js render?

a)

A navigation bar

b)

A footer

c)

A sidebar

d)

A header

4.

What does the display: flex property do?

a)

Enables flexible box layout

b)

Centers all items

c)

Adds internal spacing

d)

Sets a light gray background

5.

What is the purpose of cursor: pointer in WElcome.CSS?

a)

Changes mouse to 👆 on hover

b)

Displays icons

c)

Sets the size of elements

d)

Adds spacing between items

6.

What does the justify-content property control in a flex container?

a)

Size of the flex container

b)

Direction of the flex items

c)

Spacing between items

d)

Alignment of items along the main axis

7.

What is the effect of the display: grid property?

a)

Sets a fixed width for elements

b)

Changes the background color

c)

Aligns items vertically

d)

Creates a grid layout for child elements

8.

What does the useEffect() hook do in React?

a)

Handles form submissions

b)

Manages state in class components

c)

Renders components conditionally

d)

Performs side effects in function components

9.

What does the useParams() hook return in React Router?

a)

The location object

b)

The current URL parameters

c)

The state of the application

d)

The history object

10.

What is the purpose of the key prop in React lists?

a)

To manage state

b)

To style the elements

c)

To set the default value

d)

To uniquely identify elements

11.

What does the CSS property align-items do in a flex container?

a)

Controls the order of items

b)

Sets the size of the flex items

c)

Aligns items along the cross axis

d)

Changes the background color

12.

What does the align-self property do in a flex container?

a)

Sets the size of the flex container

b)

Changes the order of flex items

c)

Applies margin to all items

d)

Aligns a single flex item