T
TanStack8mo ago
genetic-orange

`beforeLoad` not called for pathless route

Hi, I have a pathless route called _authenticated.tsx with a beforeLoad function but it's never called. Is this by design or may it be a bug? Child routes' beforeLoad of this pathless route is called, so I'm sure I'm not throwing something in the pathless parent beforeLoad.
5 Replies
fascinating-indigo
fascinating-indigo8mo ago
can you show your file structure?
genetic-orange
genetic-orangeOP8mo ago
No description
genetic-orange
genetic-orangeOP8mo ago
This is my URL: https://127.0.0.1:5173/dashboard/asd First _root.tsx beforeLoad is called, then I would expect the _authenticated.tsx beforeLoad to be called, but for me, the beforeLoad from _authenticated.dashboard.$teamSlug.tsx is called. Hmm, it doesn't seem like _authenticated.tsx is called for that url...
genetic-orange
genetic-orange8mo ago
please create a minimal complete example by forking one of the existing examples on stackblitz
genetic-orange
genetic-orangeOP8mo ago
ohh it was a user error 🤦‍♂️

Did you find this page helpful?