'What is the best way to include this within a React application? #731
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).
Solution 1:[1]
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
Solution 2:[2]
Additionally, SVG-Edit has a neighboring repo demoing a react app based around it's core code.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | leo_sheecool |
Solution 2 | vtrubets |