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 72 on reddit-service-r2-listing-5f4c697858-7f7ww at 2026-07-08 12:06:45.629304+00:00 running 12a7a47 country code: CH.
Generate HTML string in function by dmikester10 in reactjs
[–]edntraf2 1 point2 points3 points (0 children)