Skip to content
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

Forward along components when passed as a prop #636

Merged
merged 1 commit into from
Jul 12, 2019
Merged

Conversation

johno
Copy link
Member

@johno johno commented Jul 12, 2019

MDX element creation dropped the components prop
when it was explicitly passed as a prop. For now
we will continue to forward it along.

For the MDX specific component prop, in the future,
we should consider potentially prefixing as mdxComponents.

Closes #635

MDX element creation dropped the components prop
when it was explicitly passed as a prop. For now
we will continue to forward it along.

For the MDX specific component prop, in the future,
we should consider potentially prefixing as mdxComponents.

Closes #635
@vercel
Copy link

vercel bot commented Jul 12, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Copy link
Member

@ChristopherBiscardi ChristopherBiscardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reduces weird behavior to this case:

<Component components={{h1: ...}}>
<h1> things</h1>
</Component>

and allows components to be passed through unmodified to the consuming component. I see this case coming up much less, so lgtm.

@johno johno merged commit ad237d8 into master Jul 12, 2019
@johno johno deleted the component-props branch July 12, 2019 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

MDX eats components prop on Components in MDX content
2 participants