how to get svg from pucblic folder in react 1

how to get svg from pucblic folder in react

import { ReactComponent as Avatar1 } from './assets/avatar_1.svg';

use it as 

Here is what the above code is Doing:
1. We’re importing the ReactComponent from the react-svg package.
2. We’re importing the SVG file as a React component.
3. We’re using the React component as a normal component.

Similar Posts