Replies: 1 comment 1 reply
-
If your <div dangerouslySetInnerHTML={{_html:body}} /> |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to use small mdx-files as file based micro CMS to pass content to teaser-component that I have on my pages.
I have it working when importing the mdx file into my index page and passing the mdx file as a component to the children of my teaser-component.
However, I would prefer passing the body to the component just using graphQL and handling the transformation of the body to html inside my teaser-component.
The question is: How can I transform the
body
string I receive from graphQL withallMdx
to html?This is my working index.tsx. However, I don't want to pass
<Content />
like this.Beta Was this translation helpful? Give feedback.
All reactions