Joint session with Vercel: How to build intelligent storefronts (May 15th)

Migration from v2 to v3 - blockContent won't Render

4 repliesLast updated: Mar 2, 2023

Hi there! Trying to migrate for the first time from v2 to v3. I've done most of the required steps I think? But my blockContent won't render. Have I done something wrong here in blockContent.jsx?
Hi user U. Can you please show the code where you’re trying to render your block content?
Thanks. And
post.mainText
is of the
blockContent
type?
Thanks user A! Somehow 'mainText' was changed to 'body' in the schema.. simple as that. Thanks again!
Great! Glad you’re up and running. 🎉

Was this answer helpful?

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Related contributions