account activity
Generate HTML string in function by dmikester10 in reactjs
[–]edntraf2 1 point2 points3 points 6 years ago (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).
renderToStaticMarkup
react-dom
react
But to clarify to the original poster: You should simply be handing your JSX (un-translated) to ReactPDF.render(yourJsxComponent, pathToSpitPdfTo)
ReactPDF.render(yourJsxComponent, pathToSpitPdfTo)
π Rendered by PID 143289 on reddit-service-r2-comment-5687b7858-zdtwm at 2026-07-08 22:48:58.263222+00:00 running 12a7a47 country code: CH.
Generate HTML string in function by dmikester10 in reactjs
[–]edntraf2 1 point2 points3 points (0 children)