Question · Next.js course · Module 3: Styling and Visual Optimization

Location of the layout.js file

Where must the main layout.js file be located in a Next.js application with App Router?

Answer options

  • In the pages/ directory
  • In the app/ directory
  • In the src/ directory
  • In the project root directory

You can check the correct answer by solving this task in the CodeWorlds game.