Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 1 MCQs Fundamentals of Next.js and Routing

INT257 — Modern Web Application Development 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 Introduction to Next.js Easy

    What is Next.js?

  2. Question 2 of 60 Introduction to Next.js Easy

    Which programming library is the foundation of Next.js?

  3. Question 3 of 60 Features of Next.js Easy

    Which feature can Next.js use to generate HTML on the server for each request?

  4. Question 4 of 60 Features of Next.js Easy

    Which Next.js component provides automatic image optimization?

  5. Question 5 of 60 Project Structure Easy

    Which directory commonly contains routes when using the Next.js App Router?

  6. Question 6 of 60 Project Structure Easy

    What is the main purpose of the public directory in a Next.js project?

  7. Question 7 of 60 App Router Easy

    Which file normally defines the UI for a route in the App Router?

  8. Question 8 of 60 App Router Easy

    In the App Router, what does each folder inside the app directory usually represent?

  9. Question 9 of 60 Development Workflow Easy

    Which command commonly starts a Next.js development server?

  10. Question 10 of 60 Development Workflow Easy

    What usually happens when a developer saves a file while the Next.js development server is running?

  11. Question 11 of 60 File-based Routing Easy

    What determines a URL path in Next.js file-based routing?

  12. Question 12 of 60 File-based Routing Easy

    Which file path creates the /about route with the App Router?

  13. Question 13 of 60 Dynamic Routes Easy

    Which folder name defines a dynamic id route segment?

  14. Question 14 of 60 Dynamic Routes Easy

    What can the route app/products/[id]/page.js match?

  15. Question 15 of 60 Nested Routes Easy

    Which folder structure creates the nested route /dashboard/settings?

  16. Question 16 of 60 Layouts Easy

    What is a layout mainly used for in the Next.js App Router?

  17. Question 17 of 60 Layouts Easy

    Which file defines a layout in the App Router?

  18. Question 18 of 60 Navigation Easy

    Which Next.js component is commonly used for client-side navigation between pages?

  19. Question 19 of 60 Error and Loading UI Easy

    Which special file displays a loading state for a route segment?

  20. Question 20 of 60 Error and Loading UI Easy

    Which special file provides an error boundary UI for a route segment?

  21. Question 21 of 60 Introduction to Next.js Medium

    A team wants to build a React application with server rendering, routing, and production build optimization without configuring each capability separately. Why is Next.js suitable for this project?

  22. Question 22 of 60 Features of Next.js Medium

    A product page must display current inventory when requested while keeping most rendering work on the server. Which Next.js capability best supports this requirement?

  23. Question 23 of 60 Project Structure Medium

    In an App Router project, which structure creates a home page and a shared root layout?

  24. Question 24 of 60 App Router Medium

    A component under the app directory uses useState and handles a button click. What must be added to the component file?

  25. Question 25 of 60 Development Workflow Medium

    After creating a Next.js project, a developer runs npm run dev and edits app/page.js. What behavior should normally occur?

  26. Question 26 of 60 File-based Routing Medium

    A developer creates app/contact/page.js. Which URL renders that page?

  27. Question 27 of 60 Dynamic Routes Medium

    A store needs product URLs such as /products/42 and /products/105. Which file path should define the product page?

  28. Question 28 of 60 Dynamic Routes Medium

    Given app/blog/[slug]/page.js, which value should params.slug contain when a user visits /blog/next-routing?

  29. Question 29 of 60 Dynamic Routes Medium

    A documentation site must match /docs/setup as well as /docs/setup/windows. Which route definition captures one or more segments after /docs?

  30. Question 30 of 60 Nested Routes Medium

    A dashboard needs a settings page at /dashboard/settings. Which directory structure maps directly to that URL?

  31. Question 31 of 60 Nested Routes Medium

    A team places an admin page at app/(internal)/admin/page.js. What URL should expose the page?

  32. Question 32 of 60 Layouts Medium

    A navigation sidebar should persist while users move between /dashboard/reports and /dashboard/settings. Where should the sidebar usually be defined?

  33. Question 33 of 60 Layouts Medium

    What must a root layout component include so that route content can appear inside its shared HTML structure?

  34. Question 34 of 60 Navigation Medium

    A header links to /dashboard and should use client-side navigation with Next.js prefetching support. Which implementation is most appropriate?

  35. Question 35 of 60 Navigation Medium

    A Client Component must redirect to /checkout only after a form is successfully submitted. Which App Router API is appropriate?

  36. Question 36 of 60 Navigation Medium

    A Client Component highlights a menu item when its URL matches the current route. Which hook should it use to read the current pathname?

  37. Question 37 of 60 Error and Loading UI Medium

    A route segment performs slow data fetching. Which file provides an immediate fallback while that segment's content is loading?

  38. Question 38 of 60 Error and Loading UI Medium

    A dashboard route needs to catch rendering errors in its segment and offer a retry button. Which setup is appropriate?

  39. Question 39 of 60 Project Structure Medium

    A component is reused by several routes but should not create a URL of its own. Where can it be placed within an App Router project?

  40. Question 40 of 60 Features of Next.js Medium

    A page displays an image whose dimensions vary across devices, and the team wants built-in resizing and lazy loading. Which Next.js feature should be used?

  41. Question 41 of 60 Introduction to Next.js Hard

    A team is migrating a React single-page application to Next.js. One page must read directly from a database, keep credentials off the browser bundle, and send rendered HTML without creating a separate REST endpoint. Which Next.js design best satisfies these requirements?

  42. Question 42 of 60 Features of Next.js Hard

    An App Router page contains a large data-access library and a small interactive counter. Which component boundary most effectively minimizes client-side JavaScript while preserving interactivity?

  43. Question 43 of 60 Project Structure Hard

    A project uses src/app/page.tsx, src/components/Nav.tsx, and public/logo.svg. Which reference correctly renders the logo regardless of the source file's depth?

  44. Question 44 of 60 Project Structure Hard

    A repository accidentally contains both app/page.tsx and src/app/page.tsx, while configuration files remain at the repository root. What is the correct architectural conclusion?

  45. Question 45 of 60 App Router Hard

    A Server Component needs to render an interactive search box that uses state and browser event handlers. Which composition is valid under the App Router?

  46. Question 46 of 60 App Router Hard

    A developer adds "use client" to app/dashboard/layout.tsx and imports several utility modules from it. What is the most important consequence?

  47. Question 47 of 60 Development Workflow Hard

    During next dev, editing a component sometimes preserves its local state and sometimes remounts it. Which statement best describes the expected behavior?

  48. Question 48 of 60 Development Workflow Hard

    A route works under next dev but fails only when preparing a production deployment. Which command sequence most directly tests the production compilation and runtime behavior locally?

  49. Question 49 of 60 File-based Routing Hard

    Given app/page.tsx, app/about/page.tsx, app/about/team.tsx, and app/contact/layout.tsx, which URL set is directly routable from these files?

  50. Question 50 of 60 File-based Routing Hard

    A project contains app/(marketing)/about/page.tsx. What public URL is produced, assuming no conflicting route exists?

  51. Question 51 of 60 Dynamic Routes Hard

    A segment contains both app/blog/[slug]/page.tsx and app/blog/archive/page.tsx. Which component handles a request for /blog/archive?

  52. Question 52 of 60 Dynamic Routes Hard

    For a route defined as app/docs/[[...parts]]/page.tsx, which request can match with parts absent rather than containing one or more strings?

  53. Question 53 of 60 Dynamic Routes Hard

    A developer wants /shop to show the shop index while /shop/a/b captures a and b in one route parameter. Which route structure supports both without a separate /shop page?

  54. Question 54 of 60 Nested Routes Hard

    Given app/dashboard/settings/profile/page.tsx, which directories may define layouts that naturally wrap the profile page without changing its URL?

  55. Question 55 of 60 Nested Routes Hard

    Two teams create app/(store)/products/page.tsx and app/(catalog)/products/page.tsx. Why is this structure invalid?

  56. Question 56 of 60 Layouts Hard

    A shared dashboard layout fetches user data and renders a sidebar. When navigating between /dashboard/analytics and /dashboard/settings with Next.js navigation, which behavior should the developer design for?

  57. Question 57 of 60 Layouts Hard

    An App Router application defines its required root layout in app/layout.tsx. Which output is the root layout responsible for providing?

  58. Question 58 of 60 Navigation Hard

    A Client Component handles a successful form interaction and must navigate programmatically to /account without a full document reload. Which API is appropriate?

  59. Question 59 of 60 Navigation Hard

    A page renders <Link href="/reports">Reports</Link>, but /reports has a slow server-rendered subtree. Which statement best captures why navigation may still feel faster than using a plain <a> element?

  60. Question 60 of 60 Error and Loading UI Hard

    A route segment contains page.tsx, loading.tsx, and error.tsx. The page suspends while fetching and later throws during rendering. Which behavior matches the App Router's segment boundaries?

That's unit 1

Answer a few questions and your score shows up here.