Layout for layout group

To make a layout for a route you need to make a .tsx file with the same name as the parent folder. But in case of layout groups, you specify them with (), but you can also rename index.txs of a route with (). How should I name the layout file? (app).tsx, app.tsx, routes.tsx do not work
2 Replies
younghustlercentral
Im coming from sveltekit so its quite confusing i just read the docs i guess they do not work the same way as in sveltekit
BlackCaesar
BlackCaesar2y ago
You have to name it (app).tsx, same as the folder, and it should be on the same level as the folder not inside it. Make sure you have the Outlet component in the layout file as well. I believe you can also rename index.tsx to (app).tsx but imo it would be confusing to have 2 (app).tsx files, so rather name it something else like (home).tsx or rename the folder and the layout file.
Want results from more Discord servers?
Add your server