I have a problem when I click on the link the page reloads. I don't want that. Can someone help me?
Answered
Pelagic Cormorant posted this in #help-forum
Pelagic CormorantOP
<Link href="/your-ids" className={yourIdsLinkClass} prefetch={true}>
Your IDs
</Link>
Your IDs
</Link>
Answered by Giant panda
Next is a framework that performs SSR so changing between routes will perform a navigation and load the content from the server. Not sure why you're expecting anything else here.
11 Replies
Pelagic CormorantOP
Help me, pls
Wandering Tattler
It could be because you added "prefetch={true}" in the Link?
@Wandering Tattler It could be because you added "prefetch={true}" in the Link?
Pelagic CormorantOP
whether added or not, it still causes the page to reload
Giant panda
Next is a framework that performs SSR so changing between routes will perform a navigation and load the content from the server. Not sure why you're expecting anything else here.
Answer
@Giant panda Next is a framework that performs SSR so changing between routes will perform a navigation and load the content from the server. Not sure why you're expecting anything else here.
Pelagic CormorantOP
I want smoother page transitions
my all page used "use client"
Giant panda
This is an anti-pattern. Don't mark them as client components. If you want to display loading indicators between navigation you should read the docs about
loading.tsx files.loading.tsx no idea , Link make for web page reloaded
Giant panda
There is no better way, this is how Next works and Suspense boundaries are the way to make navigation more responsive.
@Giant panda There is no better way, this is how Next works and Suspense boundaries are the way to make navigation more responsive.
Pelagic CormorantOP
thank you so much