Custom Page File Name
Unanswered
Eurasian Hobby posted this in #help-forum
Eurasian HobbyOP
I'm sure I'm missing something but am finally moving over to the app router and want to give my pages custom names so they're not all page.tsx to help when looking through files in vs code
Is there a way to do this?
Is there a way to do this?
3 Replies
Singapura
As far as i know, it's not possible to to rename it. It's mandatory to name it page.jsx, so that you can co-locate your components, otherwise the router will not be able to route properly.
But maybe, you editor can prefix the names in the tabs like
But maybe, you editor can prefix the names in the tabs like
page-1/page.jsx or page-2/page.jsx.@Singapura As far as i know, it's not possible to to rename it. It's mandatory to name it page.jsx, so that you can co-locate your components, otherwise the router will not be able to route properly.
But maybe, you editor can prefix the names in the tabs like `page-1/page.jsx` or `page-2/page.jsx`.
Northeast Congo Lion
This is correct, naming convention is handled at the
folder levelexample:
Home
/app/page.js
Contact Us
/app/contact-us/page.js
Products
/app/products/page.js