MDX my new bff

Hello people who've made it thus far,

I have accomplished this week's task–behold! A React component embeded within MD!

Our signup form from challenge 4! In hindsight it was easy as pie. Only took a few days extra.

Moving to MDX

Anyone familiar with React knows that JSX is the bread and butter to the library. MDX is the love child of JSX and MD 🤱

In a nutshell MDX allows you to utilise JS, HTML, CSS (with styles={{ style }}), and MD. However, I still prefer to keep my CSS out of the mix.

So you probably already know how this works when undergoing a challenge: read some related docs, follow along and jiggle things around until it works. Very, very methodically, of course.

I mainly followed along to the doc regarding the migration from Remark to MDX. I didn't run into any notable issues (besides me misreading) and the docs were relatively simple to follow which is always nice but quite boring.

Anyhoo, with the migration we're able to use any file with the extension .md or .mdx which means any old posts that use .md still works.

Conclusion

All in all, completing this task was relatively simple and easy to fulfill. I shall be using MDX from now on :)

Comments

Add comment