score:2

Accepted answer

I'm new too but I found a simple solution, I hope that works for you, this still works for me.

  1. Download the SVG file: "svgator":

enter image description here

  1. Put the SVG file in your React app where you most desire, in my case is in assets folder:

enter image description here

  1. Import the SVG file in your component, in my case is in App.js file:

enter image description here

  1. My "App.js" file, is declared as a Class Component, at the return statement after the render method, you can put the "object" tag, taking as a data parameter the SVG component:
return (
  <div className={styles.App}>
    <object data={Test} />
  </div>
)

You don't need to remove anything from anywhere in this case, simple but hope this can work for you.


Related Query

More Query from same tag