So, in this environment, I'm working on components more than any other parts. And so, this component-driven development brings us a new way to develop and to think our application, because it involves a faster development, a simpler maintenance, better reusability, better TDD, because every part of your application is separated in small parts, in small components.
And when you split your whole frontend interface in components only, then you are able to work on small parts that are isolated in your application. And you are able to just extract your content and to have it running isolated in a sandbox environment. And in this sandbox, your component could be easily maintained, tested and documented. And this is the part that we are looking for right now.
So, in this Diataxis framework, with a component driven development era, how could we mix them all to get the most of the two worlds? That is really interesting, is that when you are working like that, this is really easy to extract your component from your application and to put it in a dedicated sandbox, working in it, making some tests, making some live use of this new component and having it available to be embedded in different parts, different era of your documentation. So your documentation can now be fully exhaustive on what is it working like that, how is this component is really useful, how could we really rely on this component in this particular context and so on.
So in my Diataxis framework putting some stuff dedicated to my component in the guides or the readmes and the O2s and so on is really really useful because it's easy now to understand where I could put my documentation for these particular parts of my applications that is this component, my dropdown, my gallery view, my hero, my button. This is exactly how I want to perform my documentation because when I'm looking for a new documentation on a project, what I am looking for is OK, what are the different components available in my library, how could I use them, how could I make them all, how could I plug them all to just interact between my components. How could I use them in React, in Visual Effects, in whatever you want. So this is exactly how we have to twist our mind to just put the documentation related to a component in the right parts of our overall documentation at all.
So with that, we are now able to play with the docs live because we could embed our component that is probably isolated from our final application in our documentation at hand. So it's really easy now to just play in our component in a sandbox with this document, this component in our documentation, play with it and just try it, test it, have some kind of experiment, break it at some point. But this is not, it is just because you could use your component in a dedicated area that is a live in documentation. So we need to mix this component in our documentation, import it in our documentation and having it lively in here. So how could we do that right now? This is the answer brought by the MDX environment. So MDX is Markdown but a glorified Markdown.
So writing your docs, right now you are probably using Markdown to write your documentation. This is just syntactic sugar in HTML, you probably know Markdown because it's almost everywhere right now, from GitHub to any CMS or documentation platform or document production platforms, so it's a really simple syntax, easy to read, easy to contribute, even if you're not technical at all. Because this is just writing text with some kind of markups that is just simple characters, so it's not that complex. It's compatible with any text editor, it's really simple to use, but it's too simple to use with really complex document. I mean, with Markdown, I can't embed my component in it, so I have to do some stuff. Okay, I can embed HTML right in my Markdown, but it's not enough. I need something more advanced, and I need something more useful when I want to work with it. This is why we have now the MDX syntax, and the MDX is just JSX embedded in Markdown. Or more than that, this is Markdown converted to JSX, that is now converted to HTML. So this is a step more between the Markdown and the HTML in the rendering process. This is not just a linear from Markdown to HTML, but this is from Markdown to JSX to HTML. So in this environment, when I'm working on my Markdown, in fact, I'm working in a JS or more a JSX document.
Comments