I am loading my SVGs as components as per the CRA docs:
import { ReactComponent as FloorPlan } from "../../images/floorplan.svg";
When I try to use the <FloorPlan /> component inside of <ReactSVGPanZoom> I get the some errors and no SVG is displayed. If I copy the contents of floorplan.svg directly it works just fine. Can someone tell me what I'm doing wrong?
I am loading my SVGs as components as per the CRA docs:
When I try to use the
<FloorPlan />
component inside of<ReactSVGPanZoom>
I get the some errors and no SVG is displayed. If I copy the contents offloorplan.svg
directly it works just fine. Can someone tell me what I'm doing wrong?Thanks!