Frontend Snacks 🍿

🍿 Cache Expensive Runtime API Calls

Hey ,

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.

I write all my newsletters using Kit ↗, my favorite newsletter platform.

Share this newsletter

Subscribe to the newsletter

Get the latest updates delivered directly to your inbox.