How to avoid "loading" state when using beforeLoad
No Token: If there is no token in local storage, I want to skip the beforeLoad entirely to avoid showing a pending component.
With Token: If a token exists, I want to trigger a request to my API to fetch user data during the beforeLoad event.
I did sth like this and it seems to work but I don't know if it's correct and good practice
I had before that check inside beforeLoad but if i was refreshing the page the pending component was showed for 1s even no request/promises where going