Flashing on refresh on a protected route
why is the page flashing before redirecting on refresh?
6 Replies
probable-pinkOP•16mo ago
And here's the context for auth:
itchy-amethyst•16mo ago
can you please provide a complete minimal example by forking one of the existing examples on stackblitz?
probable-pinkOP•16mo ago
it would be very difficult since im using custom built api etc. but ill try to simulate some behaviors so it might work. give me a sec
probable-pinkOP•16mo ago
can you try this?
https://stackblitz.com/edit/tanstack-router-wdq8cj?file=src%2Fmain.tsx
StackBlitz
Router Authenticated Routes Example (forked) - StackBlitz
Run official live example code for Router Authenticated Routes, created by Tanstack on StackBlitz
itchy-amethyst•16mo ago
can't you make the session a promise that you await?
probable-pinkOP•16mo ago
i just used the loading state on the component for now. it works but its not perfect