Skip to content
Discussion options

You must be logged in to vote

Hi @david-Khayutin! _app.js is not a replacement for index.js. _app.js is a helper file that is useful for global CSS, maintaining state, persisting layout, etc. Each page is rendered inside of _app via <Component {...pageProps} />

  • pages/index.js would be accessible at http://localhost:3000
  • page/_app.js is not accessible at any route, instead each page uses it as a "wrapper"

See the docs on _app

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@david-Khayutin
Comment options

Answer selected by david-Khayutin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants