WorksheetsMERN Stack Session 8 Quiz
Total questions: 12
Worksheet time: 6mins
What does %PUBLIC_URL% point to in React?
Your app’s public folder
Google’s Material Icons library
The current URL/path of the app
The location object
What does the useLocation() hook return?
The current route information
A user object
A location object
A fallback default value
What does the code in WElcome.js render?
A navigation bar
A footer
A sidebar
A header
What does the display: flex property do?
Enables flexible box layout
Centers all items
Adds internal spacing
Sets a light gray background
What is the purpose of cursor: pointer in WElcome.CSS?
Changes mouse to 👆 on hover
Displays icons
Sets the size of elements
Adds spacing between items
What does the justify-content property control in a flex container?
Size of the flex container
Direction of the flex items
Spacing between items
Alignment of items along the main axis
What is the effect of the display: grid property?
Sets a fixed width for elements
Changes the background color
Aligns items vertically
Creates a grid layout for child elements
What does the useEffect() hook do in React?
Handles form submissions
Manages state in class components
Renders components conditionally
Performs side effects in function components
What does the useParams() hook return in React Router?
The location object
The current URL parameters
The state of the application
The history object
What is the purpose of the key prop in React lists?
To manage state
To style the elements
To set the default value
To uniquely identify elements
What does the CSS property align-items do in a flex container?
Controls the order of items
Sets the size of the flex items
Aligns items along the cross axis
Changes the background color
What does the align-self property do in a flex container?
Sets the size of the flex container
Changes the order of flex items
Applies margin to all items
Aligns a single flex item
