Next.js App Router Caching Explained πŸ—ƒοΈ

Learn how to fetch, cache, and revalidate data with Next.js App Router in this comprehensive guide. Includes demo and caching basics.

Next.js App Router Caching Explained πŸ—ƒοΈ
Vercel
129.4K views β€’ Jan 15, 2024
Next.js App Router Caching Explained πŸ—ƒοΈ

About this video

Learn how to fetch, cache, and revalidate data using the Next.js App Router.

0:00 – Introduction
0:24 – Demo
1:20 – Caching overview
2:06 – Foundations
6:10 – Static: fetch()
7:03 – Dynamic: fetch() without caching
7:37 – Static: unstable_cache()
9:37 – Dynamic: Direct database calls
10:07 – Revalidating static data
12:32 – Revalidating from external sources (webhooks)
14:12 – Revalidating static data with ISR
15:28 – React cache()
16:40 – App Router and Pages Router differences
17:52 – Example: Forms with useFormState & useFormStatus
19:33 – Using forms without JavaScript
19:59 – Exploring the network tab for a Server Action
20:49 – Example: Optimistic UI
21:45 – Preventing navigations with pending mutations
22:34 – Progressive enhancement
23:39 – Partial Prerendering
24:56 – Conclusion

β—† Forms example: https://github.com/vercel/next.js/tree/canary/examples/next-forms
β—† Optimistic UI example: https://github.com/vercel/next.js/tree/canary/examples/with-redis
β—† Docs: https://nextjs.org/docs/app/building-your-application/caching
β—† Deep dive: https://github.com/vercel/next.js/discussions/54075
β—† Partial Prerendering: https://vercel.com/blog/partial-prerendering-with-next-js-creating-a-new-default-rendering-model

#nextjs #react

Video Information

Views

129.4K

Likes

3.4K

Duration

25:22

Published

Jan 15, 2024

User Reviews

4.7
(25)
Rate:

Related Trending Topics

LIVE TRENDS

Related trending topics. Click any trend to explore more videos.