In Next.js, what is the default directory name where you place your page components?
- pages
- components
- routes
- views
In Next.js, the default directory name where you place your page components is "pages." This convention makes it easy to create routes for your application, as files in the "pages" directory are automatically treated as routes. While other options like "components," "routes," and "views" are common in web development, they do not serve as the default directory for page components in Next.js.
Loading...
Related Quiz
- In React Testing Library, to find an element by its role, you can use the query ________.
- The useHistory hook in React Router provides access to the ________ object which helps in programmatically navigating through routes.
- The hook that provides a way to fetch and dispatch to a React context is ________.
- What is render hijacking in React?
- You are working on optimizing a large React application. Part of the optimization involves ensuring that certain components are only loaded when they are needed. What technique would you apply?