-
-
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
MDX 3.1.0 introduce breaking change - no longer replace mdx components in React components declared in mdx files #2549
Comments
Hi! I think you mean this patch c747990. See facebook/docusaurus#9905 (comment) for some more background info. |
This comment has been minimized.
This comment has been minimized.
@wooorm Even it was not intentional I am pretty sure there are a lot of folks who relied on it, instead of doing breaking change in @remcohaszing what do you think? |
I am pretty sure basically nobody uses this. Why do you think many people use this? What you link to in nextra is not changed. It is not related What is no longer possible is that you can define a custom component ( |
Because it was an easy way to have reusable component with the same styles applied from
What do you mean? Below // my-mdx-page.mdx
export function MyComponent() {
return (
<>
<table>
<thead>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
</thead>
<tbody>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Sum</td>
<td>$180</td>
</tr>
</tfoot>
</table>
<h1>h1</h1>
<h2>h2</h2>
<h3>h3</h3>
<h4>h4</h4>
<h5>h5</h5>
<h6>h6</h6>
</>
)
}
<MyComponent /> |
I do not know what you mean. What does “unstyled” mean? You can use CSS if you want to style things? |
mdx components from
Sure, the issue is that you did significant breaking change in |
Your Nextra PR is wrong.
Has worked and still works. https://mdxjs.com/playground/ I understand that you don’t understand English well. You are mixing different things. That change in your Nextra PR is wrong. It has nothing to do with this. Components are still supported. |
You are taking this example out of the context of written section. This section explained how to have a styled
Thank you for pointing out my English 😂, my PR is not wrong, I removed the no longer worked way of having styled |
Jeez. I do not understand why Nextra has this weird guide up. If you want to pass components, pass components: In JSX, This was documented: https://mdxjs.com/docs/using-mdx/#components. This bug was not intentional. This fix is intentional. |
There is no mention in Nextra’s docs of passing |
That’s the problem. If they passed |
Initial checklist
Affected packages and versions
@mdx-js/mdx
Link to runnable example
No response
Steps to reproduce
See diff of snapshot
Expected behavior
as before or you should cut a new major release
Screen.Recording.2024-10-20.at.04.23.39.mov
Actual behavior
Screen.Recording.2024-10-20.at.04.22.44.mov
Affected runtime and version
node 20
Affected package manager and version
No response
Affected OS and version
No response
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered: