🍿 Cache Expensive Runtime API Calls


Hey Reader,

I’ve been heads-down the last few months, building something special 🤫.

It’s for every developer who’s ever felt like Next.js changes faster than they can keep up. Different caching rules. New folders. New ways to fetch data.

If that sounds familiar… this one’s for you.

Next week, I’m dropping something big, something that’ll help you finally understand how all the new pieces in Next.js 16 fit together.

No hype, no fluff - just the clarity you’ve been looking for.

Make sure you keep an eye on your inbox, you’ll get early access before anyone else 😉.

🍿 Weekly Snack: Cache Expensive Runtime API calls

Just a reminder, "use-cache" is a Next.js 16 feature lets you mark a component, function or a Page as cacheable.

If your component becomes dynamic because you called connection(), cookies(), or headers()… regular "use cache" won't work i.e. you won't be able to cache your API call even though it is expensive.

You need to use "use cache: remote" instead when you are caching in a Dynamic Context.

Now, There is more to caching though in Next.js.

There are 3 flavours of caching.

use cache: allows you to mark a route, React component, or a function as cacheable
use cache: private: allows you to use runtime APIs like cookies, headers, or search params and cache them
use cache: remote: enables caching of shared data in dynamic contexts (just covered)

You can read what "use cache: private" does here and "use cache" does here.

🚀 Latest Frontend News

How I Built a Custom Course Platform on Next.js (the same one that powers Modern Full Stack Next.js Course) along with the lessons and challenges I faced along the way.

TanStack DB 0.5 is here - Your component's query IS the API call. No custom endpoints. No GraphQL resolvers. Just write your query and DB figures out exactly what to fetch.

From Error to Fix: AI-Powered Debugging with Sentry and GitHub, a great deep dive (I use Sentry on my course platform) by Cody De Arkland.

How do you structure your React State? A great underrated docs page.

Free 250+ Open Source SVG Icons that are high quality, check it out here

Upgraded the Next.js Course Platform to provide a Better, Faster, More Engaging Path to Mastering Next.js, watch here

react native.directory is a great reference for all popular React Native libraries

Write React code in your developer panel with JSX Tooling

--

If you’ve published a blog post or shipped something, feel free to reply to this email and it comes straight to my inbox. I’m always looking for great community work to consider featuring.


What do you think of today's Newsletter? Simply click on one of the links below.

🔥 Love it!

😐 It’s okay

👎 Not good



All past newsletters
can be found here.

You can email me at me@kulkarniankita.com to advertise/sponsor the newsletter.

For those curious, I write all my emails using Convertkit.

Ankita Kulkarni

Join 9200+ subscribers reading by weekly personalized Newsletter that helps developers level up their skills through weekly Frontend and Leadership Snacks. You get a deep dive into a Tech topic, Actionable tips to excel in your career and a toolbox!

Read more from Ankita Kulkarni
git worktree

Hey Reader, A lot of you have been asking me how I’m able to stay so productive and get a lot of work done so I finally broke down my exact workflow and setup in a short video. 🍿 Our Weekly Snack: Run Multi Agents stress free with Claude Code Git work trees let you check out multiple branches at the same time each in its own folder all backed by the same repo. Instead of one working directory and constant branch switching, you get parallel workspaces. Each work tree has its own isolated...

skills vercel

Hey Reader, I just dropped a super exciting video that covers all 29 Common Next.js Mistakes that I have seen a lot of developers make (including senior developers). PRESENTED BY GRAPHITE Ship AI-generated code without getting buried in massive PRs. Stacking breaks large changes into small, logical PRs that your team can review and merge in parallel, making development faster and smoother. Graphite is the tool that makes stacking effortless. It, Organizes your work, Highlights clean diffs,...

Cleaner alternative to Next.js Serverless Functions

Hey Reader, Happy New Year! As we begin the year, I have dropped an exciting build for you on Building a Full Stack AI SaaS with Next.js 16, React, Hono.js, Tailwind that helps you find your AI Learning Partners based on your Learning Goals. Make sure to subscribe to my Youtube channel, my goal for this year is to cross 100k subscribers so help me make it happen 💪. The source code alongside cheatsheet is completely free! so enjoy and let me know what you think. PRESENTED BY CLERK Meet the...