Skip to content

How to use React and React hooks with @mdx-js/mdx? #1980

Answered by wooorm
zfben asked this question in Q&A
Discussion options

You must be logged in to vote

How should I do to make it works? (just use @mdx-js/mdx)

That works. You can use that fine “in React”.

But not on our playground.

The reason is that the website has a packaged version of React, which renders the result of the playground. And you include a different React from within the MDX “file”. Both work fine, until React notices a different React. And React doesn’t support that.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@zfben
Comment options

@wooorm
Comment options

@zfben
Comment options

@wooorm
Comment options

Answer selected by zfben
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