ReactDOMServer.renderToStaticMarkup() compatibility?
Are there any plans to support ReactDOMServer.renderToStaticMarkup()? I mean, is it even possible with current Highcharts codebase? If positive, I'd be happy to dig it deeper for a solution.
const React = require('react');
const ReactDOMServer = require('react-dom/server');
const ReactHighCharts = require('react-highcharts');
const markup = ReactDOMServer.renderToStaticMarkup(React.createElement(ReactHighCharts, { config: {"credits":false,"chart":{"type":"column","height":300} } }));
console.log(markup);
Output:
<div></div>
That's kind of related to #224.
I couldn't find a good solution for this, maybe it would be possible to make it work with JSDom? Last time I checked JSDom didn't work well with svg, but this might have been fixed since then.
I'm happy to hear your inputs/potential solutions on that.
It seems Highcharts is strongly coupled to DOM itself. Unless we can inject JSDOM (or Cheerio) to Highcharts I don't think it would be possible to use JSDOM with current Highcharts codebase in order to render it server-side (or to make a better DOM diff as #224).
Closing and there has been no activity in this issue for a while. if this is still relevant, please feel free to reopen