-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix type of children prop for react provider #1762
Conversation
Currently the `<MDXProvider />` component expects at least 2 children, but it’s also acceptable to use just one child.
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/mdx/mdx/CqKZ7nrC9MRVHb8YQAy2EhqCYgPc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about preact?
I guess it’s fine: mdx/packages/preact/lib/index.js Line 11 in 187a215
|
This comment has been minimized.
This comment has been minimized.
Yes, I checked preact too. Those types are fine. Also, playground link |
the last playground link included react for me btw, and the earlier one said that React was not defined. Seems some of the TS playground config you have isn’t coming through! |
Both work for me, also in Chrome guest mode. The second playground imports |
ah, maybe that was it. Checked in Chrome and that does seem to work! |
Currently the
<MDXProvider />
component expects at least 2 children, but it’s also acceptable to use just one child.playground link