FrontendIntermediate
MDX
Pronunciationem-dee-EKS
Definition
A Markdown format that lets you use JSX components inside a Markdown file. It is common in documentation sites, where a page can show an interactive example next to plain text.
Where you hear it
Documentation sites, blogs, and learning platforms.
Examples
Each lesson is an MDX file with a few custom components.
Use plain Markdown unless you really need a component.
The docs page embeds a live chart component next to the explanation, written in MDX.
Common mistake
Putting too much logic into MDX files. Keep content simple and logic in components.
Don't confuse with
MDX is often confused with standard Markdown, but while Markdown only supports static text formatting, MDX allows for the integration of interactive React components.
Say it at work
- In a meeting or chat
Let's switch this documentation page to MDX so we can embed the live preview component directly.
- In an email or ticket
I have updated the blog post to an MDX file to include the interactive chart component as requested.