👋 Next.js Conf 2024: Come build, party, run, and connect with us! See all events

How to import PortableText in Vue.js

2 replies
Last updated: Apr 8, 2020
hello! Please anyone can tell me how to import PortableText in vuejs? the example below is for react. I need to import it in vue.js . thank you!
// Body.js
import React from 'react'
import PortableText from '@sanity/block-content-to-react'

Apr 8, 2020, 7:54 PM
You’ll need to install
sanity-blocks-vue-component
and then:
import BlockContent from 'sanity-blocks-vue-component'

Apr 8, 2020, 8:01 PM
user R
great ! I just realised that ☺️ thank you for your reply! so it's the right way to go. Thank you! 🌈
Apr 8, 2020, 8:07 PM

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?