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
ambitious-aqua•2y ago
the param being there doesn't matter right? it's the same for
albums.tsxnational-goldOP•2y ago
True!
So basically being able to escape nesting for a direct child route in a folder
ambitious-aqua•2y ago
I don't think we have a syntax for this specific case 🤔
@Sean Cassiere any idea?
eastern-cyan•2y 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 😅.