Convert String to MDX / React component #2356
-
Hi, So I've got some MDX (string) stored within my DB that is returned on an endpoint. What would be the best approach (because I can't figure it out) on displaying this? Is there a component that can convert the string to a markdown-ish react component? I'm currently running React & vite as my stack 🤔. Thanks 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Welcome @MarquesCoding! 👋
The best approach depends on your needs.
|
Beta Was this translation helpful? Give feedback.
Welcome @MarquesCoding! 👋
The best approach depends on your needs.
MDX supports both server side and client side rendering.
There are guides for client side and server side rendering for a variety of frameworks in https://mdxjs.com/docs/getting-started/