Check out example codes for "html to pdf react". It will help you in understanding the concepts better.

Code Example 1

var doc = new jsPDF();
doc.fromHTML(ReactDOMServer.renderToStaticMarkup(this.render()));
doc.save("myDocument.pdf");

Learn ReactJs, React Native from akashmittal.com