markdown-reason-react
markdown-reason-react copied to clipboard
split into 2 packages?
Idea:
- markdown to serializable ast
- ast to reason-react
My idea is to be able to avoid a reason file per markdown file for scalability reason (if you have 1000 mardown files, building as react pages might make a bundle pretty big)
How would you feel if I implemented this through CLI flags?
For the usage I have in mind, I would not be interested to have reason conversion directly. It closes door to dynamic rendering that can adjust components during rendering. I am thinking about this kind of logic, that end user can customize when rendering the ast https://github.com/MoOx/moox.io/blob/2b7d26596e9da068b9fa95fe0f4190db8908a0be/src/components/MyBodyRenderer.re#L55-L119
Gotcha, I already generate a serializable AST and can definitely expose from the module programmatically. Similar to Reason module that offers refmt as a CLI but also exposes toolchain programmatically that you can use in your code.
I'll keep this issue open, and will ping you here once I get to exposing the AST.