Created an Automatic Doc Extraction and Generator for React components

Hi there,

I have been working on this library for rescript react components, wanted to have a proper and low-maintenance documentation for these components. So I have created a doc-generator tool, this uses rescript-tools underneath to extract MDX from @ocaml.doc macro. I have used a custom components for displaying these MDX components which is completely pluggable with different other components, its all experimentation.
After trying out multiple different ways, I came to an arrangement where visual display of components behaviour can be written in React (so reusing intelliesense which we already have on editor) and this tool will pick those files and append them along with MDX docs.
With a single command, I’m able to generate docs of the entire project. This has been very helpful for me as at Juspay invests a lot on new tech, and we have our own custom components which we reuse in more than 20 dashboards. I hope that its useful for anyone out there.

More can be done in this project to make it more useful, right now its built with mindset to solve only my usecases. I’m open to suggestions and external contribution here.


Very cool! Would be nice with some published example docs somewhere to see it in action.

Will be publishing it soon, this is a screenshot just for a preview, need to work a little more as I have just seperated it out from an internal project.


Nice! I’ve been dying for tools like this. Is it just for React components, or will it cover functions?

Ideally it’ll generate documentation for any kind of rescript code, because I’m just using AST given by rescript-tools to generate doc and will be able to show any of your comments from @ocaml.doc.
But the visual display of components is only restricted to react components, its like you display how a component is appearing along with its code in MaterialUI