What is the best way to include this within a React application? #731

239 views Asked by At

I'd considering SVGEdit (https://github.com/SVG-Edit/svgedit) within a larger React context, what would be the best way to include it for development?

At first, I was thinking I'd 1) clone the entire project within the React project, 2) build it and 3) refer to the root JS/HTML? Something doesn't feel right here, as I'm not sure which is the root and this would not allow for rapid local development as it requires constantly building SVGEdit as well (for changes).

2

There are 2 answers

0
leo_sheecool On

as it is explained in the github page you can directly import the svgcanvas.js in your html. So I think you probably should keep the src folder and import the .js file as it is shown in the demo file: https://github.com/SVG-Edit/svgedit/blob/master/demos/canvas.html

0
vtrubets On

Additionally, SVG-Edit has a neighboring repo demoing a react app based around it's core code.