5 ms·
> I agree, but it's just too difficult to get away from the React ecosystem... Why? What specifically are you using for "website with markdown" that needs Reac
by lelanthran 1y ago
> I agree, but it's just too difficult to get away from the React ecosystem...
Why? What specifically are you using for "website with markdown" that needs React?
> Do you have suggestions on a better alternative?
Yes.
1. For turning markdown into html on the server (i.e. render the HTML on the server and then deliver it) use pandoc. I use it like this for my blog: https://gist.github.com/lelanthran/2634fc2508c93a437ba5ca511fafa99d https://gist.github.com/lelanthran/2634fc2508c93a437ba5ca511...
2. For turning markdown into html on the client, write a custom component that parses the markdown into DOM nodes allowing the page author to simply do `<dynamic-markdown remote-src=some/path/to/page.md>`. You can even use one of the many existing Vanilla JS libraries to do this within the custom component.
In either of those two options above, what value does React add?
- dtedesco1 1y agoIt’s the I-sometimes-want-to-use-React-components issue that is my holdup. They make it easy to do some visual/behavioral stuff and are often directly portable from other sites or oss projects.