Need to upgrade to v1 of "@mdx-js/mdx" to render JSX mid-line
See original GitHub issueCurrently JSX does not work in the middle of components with mdx-loader
, because it is using an old version of @mdx-js/mdx
.
This works
<span style={{ color: "red }}>I'm red</span>
But this doesn’t, it breaks the build 😢
I'm a paragraph in markdown <span style={{ color: "red" ]}>And I'm red</span>
This should be supported with mdx version 1
Upgrading to v1 of @mdx-js/mdx
will fix this.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
How to Upgrade to React 18
Updates to Client Rendering APIs. When you first install React 18, you will see a warning in the console: ReactDOM.render is no longer...
Read more >Migrating your React Router App to Remix
Migrating your React Router app to Remix can be done all at once or in stages. This guide will walk you through an...
Read more >ReactDOM.render is no longer supported in React 18 - Stack ...
renderToNodeStream has been deprecated. To resolve it, you can either revert to a previous version of React or update your index.js file to ......
Read more >Use Office UI Fabric React components in your SharePoint ...
In the case where you want to upgrade an SPFx v1.8 project to Office UI Fabric React v6, you'll also need to upgrade...
Read more >Use the key prop when Rendering a List with React | egghead.io
JSX is merely JavaScript and to render a list you can use the array method .map to map ... The Beginner's Guide to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ouch… but then this breaks something else. 😞 The files all load fine, front matter and everything comes through with the updated updated
@mdx-js/mdx
but then when you try to render the component from the import in React this happens:Using my experimental updated forked version of mdx-loader:
Error Message:
Ok I figured it out! 😄
With the new
result
that comes from@mdx-js/mdx
v. 1, you need to include the following:Now with my updated PR it works great. 👍