Router context and beforeLoad race condition
App.tsx
_auth.tsx
This currently works but I think the delay may be unnecessary and there may be a more elegant way of doing this.
I also tried creating the router inside the App.tsx like so:
And it worked fine but didn't let me declare the module since it can only be done at the top level of a file.
It would also likely hurt performance.
_auth.tsx
This currently works but I think the delay may be unnecessary and there may be a more elegant way of doing this.
I also tried creating the router inside the App.tsx like so:
And it worked fine but didn't let me declare the module since it can only be done at the top level of a file.
An ambient module declaration is only allowed at the top level in a file.It would also likely hurt performance.