Home > Back-end >  Is ".mdx" file format only supported/used by React.js
Is ".mdx" file format only supported/used by React.js

Time:10-05

Almost all the references online mention the use of MDX with React.js. Even though other frameworks or libraries support MDX (with help of components), I haven't specifically seen the use of ".mdx" file formats outside of React.

The support of ".mdx" files in Gatsby and Next.js allows us to create a separate folder for the blog posts and have them stored anywhere (CMS, Github etc...) which helps in organizing. And the file extension of ".mdx" itself is pretty straight-forward and self-explanatory even for a beginner to grasp the concept.

So I was just wondering - If I would like to use mdx files, am I limited to React.js? Is it possible to use Svelte, Vue as well?

CodePudding user response:

Yes you can use mdx outside of React but I think not everywhere, Check out this guides I hope they help!

CodePudding user response:

MDX as such is specifically for React because it uses JSX to define it's component.

I am sure there are alternatives for other frameworks, as a Svelte user myself I know that at least Svelte has MDSVEX which is basically the same.

  • Related