Flashing on refresh on a protected route
why is the page flashing before redirecting on refresh?
6 Replies
genetic-orangeOP•2y ago
And here's the context for auth:
correct-apricot•2y ago
can you please provide a complete minimal example by forking one of the existing examples on stackblitz?
genetic-orangeOP•2y 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
genetic-orangeOP•2y 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
correct-apricot•2y ago
can't you make the session a promise that you await?
genetic-orangeOP•2y ago
i just used the loading state on the component for now. it works but its not perfect