#Can't use custom _app.tsx?

20 messages · Page 1 of 1 (latest)

tight atlas
#

Trying to use an _app.tsx file, but it won't load. Here's an image of my file tree. It might also be worth noting that I can't use index.tsx instead of the generic page.tsx? I thought index was standard. It's in the docs.

gaunt pivot
#

if you want to use the old router, change the name of the folder

tight atlas
#

OH

#

I didn't realize that!

#

surprised the docs don't mention that

#

I don't understand why i have a pages/layout and an app/layout

gaunt pivot
#

app/layout.tsx is the new official way to compose layouts in the app router

#

the pages dir doesn't have "native" ways to do this, you need to do something yourself

#

and pages/layout.tsx isn't valid, this would create a page at app.com/layout

tight atlas
#

what is app/page.tsx then?

#

It shows jsx but won't log out. Is that server rendered pages?

#

since it's logging to the server, I'm assuming that's what it means? What will the pages directory be then?

gaunt pivot
tight atlas
#

app/page.tsx?

#

what about the pages folder? Does next13 not use that?

gaunt pivot
#

this is the old router

tight atlas
#

okay

#

so page.tsx is required within a route

gaunt pivot