This library provides a function which takes an svg string and then converts into a jsx string.
It can be used to on online svg to jsx editor or in a build process to convert svg files into jsx files.
npm install svg-to-jsx-string
import { svgToJsxString } from "svg-to-jsx-string";
const jsxString = svgToJsxString(svgString);