Skip to content

sanity-io/lcapi-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

bd20761 Β· Mar 18, 2025
Mar 11, 2025
Mar 12, 2025
Feb 21, 2025
Mar 12, 2025
Mar 18, 2025
Mar 18, 2025
Mar 18, 2025
Mar 18, 2025
Mar 12, 2025
Mar 18, 2025
Mar 18, 2025
Mar 18, 2025
Dec 12, 2024
Feb 12, 2025
Feb 14, 2025
Nov 19, 2024
Feb 19, 2025
Mar 18, 2025
Mar 18, 2025
Feb 18, 2025
Feb 13, 2025

Repository files navigation

How to use the Sanity Live Content API in various frameworks

These examples are intended to demonstrate how the Live Content API (LCAPI) works, and interacts with data loading and invalidation. They use @sanity/client alone. For some of these examples we deliver fully baked utils that you should use, for example Next.js 14 & 15 projects on App Router should use:

import {createClient, defineLive} from 'next-sanity'

const client = createClient({
  projectId: 'your-project-id',
  dataset: 'your-dataset',
  apiVersion: '2024-01-17',
  useCdn: true,
})

export const {sanityFetch, SanityLive} = defineLive({client})

instead of defining your own sanityFetch function and SanityLive component.

Examples that are done

TODO

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3