๐Ÿ”ฎ Sanity Create is here. Writing is reinvented. Try now, no developer setup

Help with reading and mapping the "aboutUsPara" section in a React app using block text.

11 replies
Last updated: Feb 22, 2023
Can anyone help me how to read this "aboutUsPara" section, even tried blockcontent. Not working
Feb 22, 2023, 5:52 AM
can you clarify what you're trying to achieve here? i'm not sure i understand
Feb 22, 2023, 5:53 AM
Hey, User...building a dummy app in react,which has a name, sub heading and a paragraph. I am able to map the name and sub heading as it's a simpe text. But as for long text paras i create a text type block as per the documentation. Hence whenever i try to map the aboutUsPara section i does not work. I am sorry i am a bit new
Feb 22, 2023, 5:57 AM
all is well
Feb 22, 2023, 5:57 AM
There is a specific component for block text that you have to import on the front end to handle the block-text
Feb 22, 2023, 5:57 AM
It's called
<PortableText />
Feb 22, 2023, 5:58 AM
i did, got an error .
Feb 22, 2023, 5:59 AM
how are you fetching the data?
Feb 22, 2023, 6:00 AM
using BlockContent
Feb 22, 2023, 6:00 AM
let me try portabletext once
Feb 22, 2023, 6:00 AM
can't thank you enough brother
Feb 22, 2023, 6:11 AM
it worked.. ๐Ÿ™‚
Feb 22, 2023, 6:11 AM

Sanityโ€“ build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?