I would like to know how it\'s possible to include an external JavaScript library in a react project. For example, I would like to import the jspdf library : https://github.
First of all, don't use the source file. Just npm install jspdf --save
like any other package, and import it with var pdfConverter = require('jspdf');
Secondly, you're missing a () in this line var doc = new pdfConverter.jsPDF('p','pt');
Do something like this:
var converter = new pdfConverter();
var doc = converter.jsPDF('p', 'pt');