Skip to content

Help inserting MDX into JSX #1339

Discussion options

You must be logged in to vote

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 using mdx.sync() but now how do I insert that into the file?

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@ChristianMurphy
Comment options

@warrenalphonso
Comment options

@ChristianMurphy
Comment options

@ChristianMurphy
Comment options

@warrenalphonso
Comment options

Answer selected by warrenalphonso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants