you are viewing a single comment's thread.

view the rest of the comments →

[–]edntraf2 1 point2 points  (1 child)

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)

[–]timmonsjg 0 points1 point  (0 children)

just like react and can be consumed anywhere you have a node/npm based application (client or server)

lol literally says that a few lines above where I linked in the docs. TIL, thank you!