When I reset the site data, some lazy routes (auth guarded) in the dashboard don't load when going from login to their pages. After navigating through the dashboard, the pages start loading as they should. And then this problem does not occur. It seems that under some conditions lazy components are not loaded. Making routes with createFileRoute help to solve the problem. But i want to use this feature. Is there another way to create lazy route with file-base stracture? Help please.
#Auth Guarded Route doesn`t load lazy component
8 messages · Page 1 of 1 (latest)
<@&1156977987980361828> <@&720742901851619479> Maybe this example can help https://stackblitz.com/edit/tanstack-router-gdphgk?file=src%2Froutes%2F_auth.dashboard.tsx
Go to dashboard and you will see blank page
Auth Guarded Route doesn`t load lazy component
please check if this is the same issue
Hm, seems yes. But in examples of this issue i didn`t see a problem on stackblitz. So i am not sure. I used official React Example: Authenticated Routes and changed dashboard route to lazy and the problem appears on first load. In oder to reproduce it, you need to reaload the app every time.
Any info about fixing it or using another aproach for lazy loading? Thanks
by "blank page" you mean that the "Hello /_auth/dashboard!" is not shown, right?
Yes, right