You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚠️It is different from MDX. Marp React is a runtime component to support for live rendering, but MDX has no runtime (Actually it is there but not recommended). There are difference to each Markdown architectures too (markdown-it vs remark), and using Marp parser in MDX would be difficult. Thus, we have no idea to support MDX for now.
The text was updated successfully, but these errors were encountered:
The other idea is using JSX in interpolation of tagged template literal to allow using components in local scope. It won't require explicit component passing.
import{Marp,jsx}from'@marp-team/marp-react'import{BarChart,Bar}from'someone-react-chart-component'// Returns something with interpolated components for parsing in Marp componentconstmarkdown=jsx`# Bar chart${(<BarCharttitle="Example bar chart"><Barvalue="5"/><Barvalue="8"/><Barvalue="4"/><Barvalue="9"/><Barvalue="7"/><Barvalue="2"/><Barvalue="6"/></BarChart>)}`// Usage of Marp component is same as Markdown by plain stringReactDOM.render(<Marpmarkdown={markdown}/>,document.getElementById('app'))
By custom function binding in HTM, we might support React component written in HTML block of plain Markdown.
The text was updated successfully, but these errors were encountered: