Optimize data fetching with the new `cache` function in NextJs @hamedbahram
Optimize data fetching with the new `cache` function in NextJs  @hamedbahram
Uploaded March 2024 | Updated December 2026, 3 hours ago
In this video, we'll use React's new `cache` function to optimize our NextJs app by caching data fetches and expensive computations and pre-loading data prior to rendering the component.

👉🏼 The Ultimate NextJs 14 Course
→ hamedbahram.io/courses/nextjs

👉🏼 Project source code (Github)
→ github.com/HamedBahram/react-cache

👉🏼 React documentation
→ https://react.dev/reference/react/cache

👉🏼 Work with me
→ hamedbahram.io/hire

Chapters
0:00 Intro
3:20 Convention
5:15 Caveats
7:45 Example usecases
12:20 When to use cache
15:25 Project code setup
16:50 Caching db queries
19:25 Preloading data
24:54 Recap
Optimize data fetching with the new `cache` function in NextJsAuthentication in NextJs using next-authBuild a blog using Contentful headless CMS and NextJsKevin Powell: The CSS King | Podcast E3Clerks New Composable UI Components (Experimental)Leveraging NextJs & Prismic CMS | Project Showcase with Studio OBVGlobal State Management in NextJs 14 Using ZustandProtecting routes in NextJs using Clerk middleware [6/6]Visual website builder for NextJs, shadcn/ui, and TailwindUsing the new next/font package | NextJs 13 seriesCaching in NextJs ft Delba Oliveira from VercelNeon: Serverless Postgres Database
Hamed Bahram |

Optimize data fetching with the new `cache` function in NextJs

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER