Next.js Discord

Discord Forum

Access <Link> loading state?

Unanswered
Southern yellowjacket posted this in #help-forum
Open in Discord
Southern yellowjacketOP
Is there a way to know when <Link> rsc call is still pending or not?

3 Replies

If understand correctly, you don’t want to display a loading shell while the coming page is suspended (this could be done adding a loading.tsx), rather you want to have access to some variable that indicates its “loading”?
@LuisLl If understand correctly, you don’t want to display a loading shell while the coming page is suspended (this could be done adding a loading.tsx), rather you want to have access to some variable that indicates its “loading”?
Southern yellowjacketOP
Sort off, but instead of waiting for the page to be suspended, rather display loading.tsx at the very moment navigation is issued
So instead of waiting for the rsc call to hit the server, we display it immediately