Possible to escape parent nesting inside a folder?
I have this example folder structure:
I want to be able to load
/library/$playlistId
and not have it render inside of library/route.tsx
Outlet.
Breaking this outside of the group with a "flat" file structure I can achieve this:
But I haven't found a way to do this when the file inside the folder starts with a $param
and it should break outside of its parent. Any advice?4 Replies
extended-salmon•16mo ago
the param being there doesn't matter right? it's the same for
albums.tsx
rival-blackOP•16mo ago
True!
So basically being able to escape nesting for a direct child route in a folder
extended-salmon•16mo ago
I don't think we have a syntax for this specific case 🤔
@Sean Cassiere any idea?
ambitious-aqua•16mo ago
If you are trying to break out of the parent route logic, then you'd have to do it the way mentioned in your OP.
Flat would be:
In folders, it'd be pretty similar to what you did above.
Edit: In the folder layout, you could substitute
library.tsx
for library/route.tsx
to match what you were doing. I just tend not to use the .route
token, since I prefer having the files correspond to the actual URL segments 😅.