
Aurora Scharff
@aurorascharff • 5,938 subscribers
DX, Docs & Education @nextjs ▲ @vercel | React Cert Lead @CertificatesDev
Shorts
Videos

I rebuilt an older Vercel book search demo with Next.js 16.3 Instant Navigations: Instant Navigations lets server-rendered routes respond immediately when you click, even on a throttled connection: 𝚌𝚘𝚗𝚜𝚝 𝚗𝚎𝚡𝚝𝙲𝚘𝚗𝚏𝚒𝚐 = { 𝚌𝚊𝚌𝚑𝚎𝙲𝚘𝚖𝚙𝚘𝚗𝚎𝚗𝚝𝚜: 𝚝𝚛𝚞𝚎, 𝚙𝚊𝚛𝚝𝚒𝚊𝚕𝙿𝚛𝚎𝚏𝚎𝚝𝚌𝚑𝚒𝚗𝚐: 𝚝𝚛𝚞𝚎 }; Cache Components prerenders static, cached, and fallback UI. Partial Prefetching brings that reusable route UI to the browser before navigation. Add 𝚙𝚛𝚎𝚏𝚎𝚝𝚌𝚑={𝚝𝚛𝚞𝚎} when a link should also resolve its URL-dependent content before the click. Anything still missing loads on the server and streams into its Suspense boundary. The filters use 𝚞𝚜𝚎𝚃𝚛𝚊𝚗𝚜𝚒𝚝𝚒𝚘𝚗 to fade the catalog while the server updates and 𝚞𝚜𝚎𝙾𝚙𝚝𝚒𝚖𝚒𝚜𝚝𝚒𝚌 to apply the next filter values immediately. Rebuilding the demo also improved initial loading. First Contentful Paint was 44% faster and Largest Contentful Paint was 33% faster than the original. See the source and learn more below ↓
Aurora Scharff56,397 Aufrufe • vor 1 Monat

Next.js 16.3 Instant Navigations lets you balance reusable content with fresh or personalized data while keeping navigation responsive, like a SPA. I built to try this in a common multi-step flow. Cache Components mark reusable flight data with 𝚞𝚜𝚎 𝚌𝚊𝚌𝚑𝚎. Partial Prefetching brings it into the browser before you click, including URL-specific content with 𝚙𝚛𝚎𝚏𝚎𝚝𝚌𝚑={𝚝𝚛𝚞𝚎}. Async React keeps search and booking actions responsive with 𝚞𝚜𝚎𝙾𝚙𝚝𝚒𝚖𝚒𝚜𝚝𝚒𝚌, 𝚜𝚝𝚊𝚛𝚝𝚃𝚛𝚊𝚗𝚜𝚒𝚝𝚒𝚘𝚗, and 𝚞𝚜𝚎𝙰𝚌𝚝𝚒𝚘𝚗𝚂𝚝𝚊𝚝𝚎. Server Functions write and refresh data with 𝚞𝚙𝚍𝚊𝚝𝚎𝚃𝚊𝚐. 𝚅𝚒𝚎𝚠𝚃𝚛𝚊𝚗𝚜𝚒𝚝𝚒𝚘𝚗 animates loading and confirmation. I’m also testing 𝚞𝚗𝚜𝚝𝚊𝚋𝚕𝚎_𝚙𝚛𝚎𝚏𝚎𝚝𝚌𝚑() and 𝚞𝚗𝚜𝚝𝚊𝚋𝚕𝚎_𝚗𝚊𝚟𝚒𝚐𝚊𝚝𝚒𝚘𝚗() to refine what waits for navigation, like search results and live seat availability. See the source and learn more below ↓
Aurora Scharff11,055 Aufrufe • vor 1 Monat
Keine weiteren Inhalte verfügbar