Sanity Live Cache Components

Integrates Sanity Live with Next.js Cache Components in next-sanity v13+ apps. Sets up sanityFetch, a shared cachedSanity 'use cache' boundary, <SanityLive>, Visual Editing, Presentation Tool, draft mode handling, and the three-layer (Page/Dynamic/Cached) component pattern with explicit perspective/stega prop-drilling. Sequences with the official Next.js skills (next-cache-components-adoption, next-cache-components-optimizer, next-partial-prefetching-adoption, next-dev-loop). Use when configuring or migrating a Next.js app to cacheComponents with Sanity, when adding sanityFetch, when wiring <SanityLive>/<VisualEditing>, or when refactoring components that hardcode perspective/stega.

sanity-io 6302a43 5 files · 44.4 KB Updated

File contents

sanity-io/next-sanity/tree/main/skills/sanity-live-cache-components commit 6302a43e04

Frequently asked questions

npx skillmds add sanity-io-next-sanity/sanity-live-cache-components