DEV Community

Cover image for Convert the Gatsby default starter blog to use MDX

Convert the Gatsby default starter blog to use MDX

Scott Spence on April 11, 2019

Photo by James Wheeler on Unsplash In this guide we're going to cover converting the Gatsby default blog starter to use MDX. All the co...
Collapse
 
dance2die profile image
Sung M. Kim

Thanks for the tutorial, Scott.

It looks like MDX can do everything that Markdown can but better with component support.

So would there be any case where one would not use MDX over regular markdown plugin?

Collapse
 
spences10 profile image
Scott Spence

If you don't want to have JSX in your markdown then there's no real use for MDX if you're already using markdown, I guess.

Collapse
 
aliahsan07 profile image
Ali Ahsan

did you forget to import the dependency @mdx-js/react?

Collapse
 
spences10 profile image
Scott Spence

I didn't know it was needed until I watched Chris Biscardi's egghead.io videos 🙃

For the example I have done here there's no need for it.