惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Tailwind CSS Blog
博客园 - 聂微东
S
Schneier on Security
The Last Watchdog
The Last Watchdog
N
News and Events Feed by Topic
N
News | PayPal Newsroom
Webroot Blog
Webroot Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Schneier on Security
Schneier on Security
PCI Perspectives
PCI Perspectives
C
Cyber Attacks, Cyber Crime and Cyber Security
V
Visual Studio Blog
Blog — PlanetScale
Blog — PlanetScale
Spread Privacy
Spread Privacy
Cisco Talos Blog
Cisco Talos Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Help Net Security
Help Net Security
P
Proofpoint News Feed
阮一峰的网络日志
阮一峰的网络日志
NISL@THU
NISL@THU
博客园 - Franky
N
Netflix TechBlog - Medium
Know Your Adversary
Know Your Adversary
L
Lohrmann on Cybersecurity
F
Fortinet All Blogs
WordPress大学
WordPress大学
U
Unit 42
Hacker News: Ask HN
Hacker News: Ask HN
Recent Announcements
Recent Announcements
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
A
Arctic Wolf
酷 壳 – CoolShell
酷 壳 – CoolShell
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Security Affairs
H
Hacker News: Front Page
TaoSecurity Blog
TaoSecurity Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
B
Blog RSS Feed
罗磊的独立博客
Cloudbric
Cloudbric
Y
Y Combinator Blog
B
Blog
H
Help Net Security
Microsoft Azure Blog
Microsoft Azure Blog
L
LINUX DO - 最新话题
The Register - Security
The Register - Security
D
DataBreaches.Net
GbyAI
GbyAI

Sanity.io

A Board Game agent built using Sanity Context and Vercel's AI SDK | Sanity Build a prototype with Claude Code that your whole team can edit | Sanity What’s New - May 2026 | Sanity I built a London pub guide with v0 and the Sanity MCP in six hours. Here's what I learned. | Sanity Build a conference concierge with Agent Context and Anthropic | Sanity Build a content-aware Telegram agent with Vercel AI SDK and Chat SDK | Sanity How I used Agent API to generate photos for my family’s recipes | Sanity What’s New April - 2026 | Sanity Better context, better matches: An AI love story (for dogs) | Sanity How to write for an agent | Sanity Content Agent, meet Slack: AI content operations in your workflow | Sanity Structure powers intelligence | Sanity Your agent needs better content. Here's how to give it. | Sanity How to serve content to agents (a field guide) | Sanity Sanity TypeGen GA: Automatic TypeScript types for content and GROQ | Sanity Sanity is now available on the Vercel Marketplace | Sanity The logo soup problem (and how to solve it) | Sanity Content Releases: From scattered updates to coordinated publishing | Sanity What's New - February 2026 | Sanity How we solved the agent memory problem | Sanity v0 Builder Challenge: The winners | Sanity Introducing: Sanity Agent Skills | Sanity Content Agent: Days of work in one conversation | Sanity Our Sanity Values | Sanity Open Source Pledge 2025: Stepping up when it matters | Sanity v0 builder challenge: $3000 in prizes | Sanity Why AI Breaks Without Structured Content Operations | Sanity What’s New January - 2026 | Sanity BFCM 2025: What teams built when infrastructure stopped being the problem | Sanity How AI shaped holiday shopping and what it means for content in 2026 | Sanity Sanity Studio v5: Embracing React 19 | Sanity You’ll need a CMS eventually. Let your agent set it up. | Sanity “You should never build a CMS” | Sanity AI Content Operations: A 30-Day Implementation Guide | Sanity What’s New December - 2025 | Sanity Scheduled Drafts: Stop manually publishing content at midnight | Sanity What’s New November - 2025 | Sanity Everything *[NYC] 2025 recap: A day of AI, Content Operations, and Culture | Sanity Clankers and content operations | Sanity Content Agent: AI that understands your structured content is here | Sanity Why design-driven content modeling creates technical debt, not velocity | Sanity What's New October - 2025 | Sanity From studio to inbox: How Kevin Green eliminated email campaign friction | Sanity The content editor's guide to content operations [E-commerce edition] | Sanity styled-components maintenance mode: A 40% faster fork | Sanity From zero code to a live website in 7 hours (thanks, Cursor!) | Sanity First attempt will be 95% garbage: A staff engineer's 6-week journey with Claude Code | Sanity Internationalization is more than translating words | Sanity What's New - September 2025 | Sanity We just deleted our 35k-member community Slack | Sanity What's New - August 2025 | Sanity The engineer's guide to content operations [E-commerce edition] | Sanity SEO for AI: Evolving from Web Pages to the Content Lake | Sanity What's New - July 2025 | Sanity Sanity Studio v4: A major version bump for a minor reason | Sanity What's New - June 2025 | Sanity Dashboard and Insights: Your New Content HQ | Sanity Canvas: AI-accelerated, context-aware, freeform authoring | Sanity Agent Actions: AI building blocks for structured content | Sanity Functions: Life beyond pressing publish | Sanity The end of CMS era and our $85M Series C. | Sanity What's New – May 2025 | Sanity Introducing the Sanity Model Context Protocol (MCP) server | Sanity What's New – April 2025 | Sanity Pushing all the envelopes with ambitious content | Sanity Self-hosting is only free if your time is worth nothing | Sanity Content that lasts: Scaling beyond your frontend | Sanity The Live Content API is now Generally Available | Sanity The future beyond AI chat bots | Sanity Learning the new skill of working with AI | Sanity What's New - March 2025 | Sanity Give it in plain text: Making your content AI-Ready | Sanity No More 'DO NOT PUBLISH': Introducing Content Releases | Sanity React in 2025, what's next? | Sanity The final boss of front-end: block editors | Sanity Introducing Sanity for Startups | Sanity A block content editor that loves you back | Sanity A Black Friday Snooze Fest: Massive Traffic, No Drama | Sanity How to make a recipe site that scales well | Sanity The Sanity Winter Release 2024 | Sanity AVIF Arrives, Sanity’s Promise Fulfilled | Sanity Sanity joins the Open Source Pledge | Sanity Your content is now Live by default | Sanity Begin Team to Join Sanity | Sanity Sanity Digest - September '24 Edition | Sanity Sanity partners with Google. Now live on the Google Cloud Marketplace. | Sanity Sanity Digest - August ‘24 Edition | Sanity Now playing: the latest Mux Video Input plugin for Sanity | Sanity Community Digest - June ‘24 Edition | Sanity Community Digest - May ‘24 Edition | Sanity Guide to Sanity's newest product announcements | Sanity AI and Content Creation: A Leader's Guide | Sanity Of course, you should be able to type your content quickly! | Sanity New to AI Assist: translation, reference suggestions, image generation | Sanity Speak the language of your editors: Sanity Studio UI localization | Sanity Introducing the new Sanity Growth plan to serve collaborative teams | Sanity Presentation: Work faster than ever with structured content | Sanity Goodbye Feedback Frenzy, Hello Sanity Studio Comments! | Sanity Easing into the App Router with the Sanity Toolkit for Next.js | Sanity Making website updates easier with structured content | Sanity
A new era for content applications with Sanity App SDK | Sanity
Simeon Griggs · 2025-05-12 · via Sanity.io

Over the last few years, I've shipped over a dozen plugins and written thousands of words of tutorials and lessons on how to customize Sanity Studio.

The Sanity App SDK is the toolkit I have always wanted.

What was always possible is now far simpler with the Sanity App SDK. Until now, building your own content experiences meant building them inside Sanity Studio and having to recreate the Studio's UX.

The Sanity App SDK distills the behaviors authors expect—live updating document lists, automatically creating drafts, multiplayer editing—and into reusable hooks for developers to build novel content applications rapidly.

Table view of events in an editable CMS
Demo: Table view for bulk editing of specific documents, as well as actions to reset and publish. Simple to build with Sanity App SDK

With this UI baked in, you're free from technical overhead to build impressive content applications that solve for content creators' needs for immediate business impact. Build fit-for-purpose applications instead of trying to mutate a cookie-cutter CMS into something it was never meant to be.

Google map showing pins for event locations
Demo: Map view for rendering events based on location. This demo also creates new documents by clicking on the map.

The App SDK welcomes developers to an ambitious future that is less about prying apart Sanity Studio code and instead about building entirely new content experiences, faster than ever.

Calendar with event titles rendered
Demo: Calendar with drag-and-drop functionality to render and update event documents based on their date

Content operations are jobs to be done

With Sanity Dashboard (the new "home screen" of the Content Operating System), the content apps you build can be deployed independently to operate across projects and datasets.

Our team has over eight years of experience building real-time content editing experiences for content creators. The App SDK is our way of distilling all we've learned into a distributed library for developers and the content creators they empower.

It's time to build, not just configure

The primary way to work with Sanity content has always been the Sanity Studio. Being truly "headless," it is built on the same APIs developers could use to make their applications perform queries and mutations using either the Sanity Client or the HTTP API.

However, Sanity Studio has a few opinionated user experience implementation details that authors come to expect, like the way editing a published document immediately creates a new draft or how a rendered list of documents stays updated in real-time.

It could be disorienting if you needed to build your own content review or editing experience, and what you built didn't work the same way.

So while developers have always loved Sanity Studio for its configurability and customizability, building entirely new experiences has been more difficult than we were ever happy with.

That changes now.

Introducing App SDK

Headless CMSes have only ever promised multi-channel to create multiple front-ends that query and display content.

Sanity App SDK fulfills the content operating system promise by allowing the creation of multiple content editing applications.

A toolkit for initializing apps

The Sanity CLI now contains a command to bootstrap a new Sanity app, which can be deployed to the Dashboard.

This template comes preconfigured with Vite, TypeScript, and Sanity UI—what you do next is up to you.

Headless, by design

App SDK is "headless," meaning it does not come with visual components or styles. All of its functionality is centered around querying and modifying content data. It's up to you how to style the user interface.

This template includes Sanity UI—but your custom apps can be styled with Tailwind, shadcn/ui, Bootstrap, jQuery UI, or just raw CSS if you're freaky.

For consistency and familiarity we recommend using the same component library as all Sanity apps—Sanity UI—but you're welcome to ignore our recommendation.

React context and hooks

The React package makes available a SanityApp provider to wrap your application to perform queries and mutations. This context also contains internal logic for optimistic edits and caching so that all queries and mutations are self-updating and super fast.

Many hooks are exported by the React package, read about them all in the documentation. Highlights include:

  • useDocuments returns a live list of "document handles" when given a GROQ filter. Includes affordances for optimistic UI such as pending states, a function to load more results and best of all stays updated as edits are made to documents thanks to the Live Content API.
  • useDocument returns the full body of a document when given a document handle, or it can be scoped to a specific "path."
  • useEditDocument takes a document handle and a path to edit, with optimistic, per-render local-first updates and auto-magically handling the creation of draft documents when starting with a published ID.
  • useApplyActions provides a function into which multiple document actions can be made. Whether they are edits, publishes, deletions or more. This makes bulk-editing of documents possible and simple.

TypeScript support

Sanity App SDK pairs nicely with Sanity TypeGen (currently in Beta) for type safety across all your schema types and query responses.

See the documentation on how to setup TypeGen with App SDK apps.

Code examples

Every App built with the SDK starts with the SanityApp wrapper, configured with settings for multiple projects.

You read that correctly, multiple projects. Unlike the Studio which could only ever target a single project and dataset. App SDK apps are designed to span across multiple configurations.

SanityApp context

The SanityApp context will handle deduplicating, memoizing and optimizing every fetch for content, so there's no need to do your own caching or memoization.

useDocuments

You may be used to querying all required content in a single, huge GROQ query passed into client.fetch(). But most SDK apps begin with a fetch for documents of a certain _type, and resolve each matched document individually.

Rendering a live-updating list of documents can be done with the useDocuments hook. By default the hook will only return up to 25 documents, and more can be fetched via the loadMore function returned by the hook.

For improved performance, the data returned by this hook is deliberately kept small. An array of "document handles." Each document's _id and _type fields, represented as documentId and documentType.

useDocument

For high-performance, real-time updates the useDocument hook retrieves the content of an entire document, or specific values using a path. This hook can be intensive, so it's best used lightly. Fortunately there are hooks for memory friendly data fetching and rendering.

useDocumentProjection

This hook allows you to select individual attributes from a document—or transform them since GROQ is so flexible—as well as resolve references.

useEditDocument

Now for some real magic.

You can edit any value of a document with the useEditDocument hook. In this example simply editing a string type field value with an input element.

This hook handles the logic of creating a new draft if the current document is already published. It also updates the in-memory context so your UI has local-first, optimistic updates while they are synced to the Content Lake in the background.

useApplyDocumentActions

To take actions on a single, or multiple, documents the useApplyActions provides a function which accepts an array of action functions. Use this to publish or discard drafts, or create granular edits across multiple documents in one transaction.

More hooks are exported by the React package, read about them all in the documentation.

Rocket-boosters for your content apps

The App SDK has been designed and built in close consultation with many of our largest customers who have created their own bespoke Sanity content apps or deep Sanity Studio customizations.

We can't wait to see what you'll build. If you'd love to show it off, tag us on social media or join our community on Discord and post up in the Showcase channel.