What is the alternative to pages/_app.js in Application Router in NextJS?
P粉2778243782023-11-11 09:38:14
0
1
927
I just started using NextJS and there is a new router called Application Router. Now I have some tutorials using pages/_app.js from NextJS Page Router. So, what is the corresponding file in Application Router?
Within app, each folder represents a route segment. The first folder, the application itself, represents the root routing segment.
app/layout.js will now be equivalent to _app.js in the new Next 13 app directory. Because, it is the one that wraps all the routes and sub-routes of the entire application.
Within
app
, each folder represents a route segment. The first folder, the application itself, represents the root routing segment.app/layout.js
will now be equivalent to_app.js
in the new Next 13 app directory. Because, it is the one that wraps all the routes and sub-routes of the entire application.