Skip to content

MDX with Gatsby Integration returning passed function alone #2177

Discussion options

You must be logged in to vote

Welcome @jideabdqudus!
Sorry you ran into a spot of trouble.
It sounds like you want MDX to be dynamically rendered client side? And that you are using @mdx-js/mdx to do so?

If so, evaluate is the function from @mdx-js/mdx you are looking for https://mdxjs.com/packages/mdx/#evaluatefile-options.
compile generates just the JavaScript source code that a browser or server could then choose to run, but isn't run or rendered into a react component yet.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@jideabdqudus
Comment options

@wooorm
Comment options

@jideabdqudus
Comment options

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