next markdown rendering library (NOT MDX) on server
So, I'm making a Q&A and users can ask questions and add markdown to their questions. I was using
Is there a way to turn off mdx in
This is exhausting, ngl
next-mdx-remote to render it, but if user adds any <Component /> to their markdown, it will throw an error when rendering it:Error: Expected component Comp to be defined: you likely forgot to import, pass, or provide it.Is there a way to turn off mdx in
next-mdx-remote, or are there any other libraries to render it on server. This is exhausting, ngl
Solution
yo, I used
react-markdown, and it works fine with SSR and RSC. So I guess just use react-markdown now, to avoid errors with JSX in markdown