Middlaware await #14503
Unanswered
tw-hedgehog
asked this question in
Q&A
Middlaware await
#14503
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
should react-router await for middleware to finish before rendering route?
Strange this is if I have even empty loader - router waits for middleware to finish. if there is no loaded then middleware is not awaited.
I use data router.
Use case is to fetch current user information and redirect if session expired or something else.
example: https://stackblitz.com/edit/github-3mlupejh?file=src%2Fapp.tsx
Beta Was this translation helpful? Give feedback.
All reactions