`react-datocms` and NextJS 13 with RSC

I am forced to render my Structured Text parser on the client side. Is there a way we could get react-datocms to be React Server Component friendly? Also, should this be here or in feature requests?

It is possible to use Structured Text in Server Components. You need to change the import from import { StructuredText } from 'react-datocms'; to import { StructuredText } from "react-datocms/structured-text";

We use it that way in a server component in our projects.

1 Like

I am running into a bunch of hydration errors when using this with next.js, have you experienced the same?

Hey @trm217 and welcome to the community!

Make sure you are not wrapping children in non div components! So if you wrap children with a <p> component you will get those hydration errors