Help inserting MDX into JSX #1339
-
I'm trying to insert content from |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Have you tried the MDX+Next guide? https://mdxjs.com/getting-started/next If the issue is persistent even after trying those, could you share a https://codesandbox.io with an example of what you tried? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply! Here's a git repo with what I'm trying to do (see You can run with Behavior like what React-Markdown provides is what I'm looking for; it's relatively painless to do |
Beta Was this translation helpful? Give feedback.
Thanks for the quick reply! Here's a git repo with what I'm trying to do (see
pages/problem.js
). I can reproduce it on a codesandbox if you'd like, I just don't have much experience on codesandbox so went with Git since it'd be faster for me.You can run with
yarn dev
, but here's a screenshot of what I've got:Behavior like what React-Markdown provides is what I'm looking for; it's relatively painless to do
<ReactMarkdown escapeHtml={false} source={file}/>
. I'm able to generate the JSX usingmdx.sync()
but now how do I insert that into the file?