Next
Playground
Next.js Quiz
A ten-question quiz that validates your answers on submit and scores the result.
1. What is the primary purpose of React's useEffect hook?
To create state variables in functional components
To handle side effects in functional components
To optimize rendering performance
To replace class components entirely
2. Which Next.js feature allows you to fetch data on the server?
getStaticProps
getServerSideProps
Server Components
All of the above
3. What is the purpose of the 'key' prop in React lists?
It's purely for accessibility purposes
It helps React identify which items have changed, been added, or removed
It's required for styling list items
It determines the order of list items
4. Which of the following is NOT a Next.js routing approach?
Pages Router
App Router
Dynamic Router
API Routes
5. What is the purpose of React's useMemo hook?
To memoize expensive function calls
To create mutable variables
To handle form submissions
To replace the useState hook
6. Which of the following is a valid way to create a Server Component in Next.js?
Adding 'use server' at the top of the file
Using the createServerComponent function
Simply not using 'use client' directive
Server components are not supported in Next.js
7. What is the purpose of the 'revalidatePath' function in Next.js?
To validate form inputs
To refresh data on a specific page
To check if a path exists
To redirect users to a valid path
8. Which hook would you use to access the current route in Next.js?
useRouter
useRoute
useNavigation
usePath
9. What is the primary benefit of using Tailwind CSS?
It has a smaller file size than other CSS frameworks
It provides utility classes for rapid UI development
It automatically handles browser compatibility
It requires no configuration
10. Which of the following is NOT a valid data fetching method in Next.js?
fetch API in Server Components
getStaticProps
useFetch hook
SWR library
Submit Answers
Next Playground