@prismicio/next
has been modernized and streamlined. Most websites built with Next.js will need minimal changes to upgrade.
For a full API reference, see the Prismic docs.
To upgrade, see the v2 to v3 upgrade guide.
New features
- Support ESM environments, including Vercel Edge Runtime and Cloudflare Pages.
Breaking changes
- Remove
<PrismicProvider>
. Replace global configuration with directly callingcreateClient()
and defining custom components. - Remove
usePrismicClient()
. Replace with directly importing a client. - Remove
usePrismicPreviewResolver()
. Replace withclient.resolvePreviewURL()
and your router's redirect function. - Remove all query hooks. Replace with
createClient()
and a query library, like TanStack Query.