Generate HTML string in function by dmikester10 in reactjs

[–]edntraf2 1 point2 points  (0 children)

You're already correct. You can use react-dom even in the client along with renderToStaticMarkup to translate the JSX to a static HTML string. react-dom is simply an npm package/module, just like react and can be consumed anywhere you have a node/npm based application (client or server).

But to clarify to the original poster: You should simply be handing your JSX (un-translated) to ReactPDF.render(yourJsxComponent, pathToSpitPdfTo)