1.Which lifecycle method in Next.js replaces the getInitialProps method when using getStaticProps and getServerSideProps?
- 1.componentDidMount
- 2.getDerivedStateFromProps
- 3.useEffect
- 4.getInitialProps ✓
2.What is the primary advantage of using TypeScript with Next.js compared to JavaScript?
- 1.Type safety ✓
- 2.Faster execution time
- 3.Reduced bundle size
- 4.Improved JSX support
3.When using Next.js, where is the code required for server-side rendering executed?
- 1.Client-side only
- 2.Server-side only ✓
- 3.Both client-side and server-side
- 4.In the build process
4.Which of the following is NOT a true statement regarding Next.js API routes?
- 1.They can connect to a database
- 2.They are deployed on the client-side ✓
- 3.They support middleware
- 4.They can return JSON responses
5.What is a primary characteristic of the "useMemo" hook in a Next.js application?
- 1.Caches a computed value ✓
- 2.Performs a side effect after render
- 3.Updates state variables only
- 4.Handles form input changes
6.What file does Next.js use to store global CSS styles?
- 1.styles.css
- 2._app.css
- 3.global.scss
- 4.globals.css ✓
7.How does Next.js handle dynamic routing compared to traditional client-side React Router?
- 1.Using a separate routing library
- 2.Through URL templates only
- 3.By defining routes in a JSON config file
- 4.By using file and folder naming conventions under /pages ✓
8.Which of the following statements about Next.js is true regarding Incremental Static Regeneration?
- 1.It requires a database connection to work
- 2.Pages are regenerated every time a request hits the server
- 3.Pages can be updated on-demand without rebuilding the entire site ✓
- 4.It doesn't allow stale-while-revalidate functionality
9.Which command is used to start a production build in a Next.js application?
- 1.next build
- 2.next dev
- 3.next prod
- 4.next start ✓
10.In the context of Next.js, what is the purpose of the 'next/link' component?
- 1.To link CSS and JS files
- 2.To preload external scripts
- 3.To manage database connections
- 4.To provide client-side transitions between routes ✓