A different way to instant navigation in RSC #13
grahammendick
started this conversation in
Ideas
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.
It's clear that people refer to Next.js and RSC interchangeably. Any trouble they have with Next.js they blame on RSC. The truth is that Next.js is a very opinionated framework and most of those opinions have absolutely nothing to do with RSC. Take instant navigation, for example.
Next.js announced instant navigation is coming in 16.3. Their implementation relies heavily on caching and prefetching. But this isn't the only way to do instant navigation in RSC. I've just released instant navigation for RSC in the Navigation router and there's no caching or prefetching involved.
In the Navigation router, scenes are composed of server component views that can update independently in response to URL changes. The
refetchprop indicates which URL parameter changes the view listens out for.To turn that into an instant navigation you wrap it in a client component view and add a suspense fallback to the server component. The
Shellclient component is shown instantly when navigating to the 'people' scene.The Navigation router doesn't need to cache or prefetch the shell because RSC bundlers automatically include top-level client components in the initial bundle. You can see it in action in the video below or try it out in the sample (use dev tools to slow down the network and see that the navigation remains instant).
Screen.Recording.2026-08-01.at.11.12.14.mov
All reactions