SVG to React API

  1. Play with react-svgr.com/playground
  2. Get config params
  3. Call SVG to React API
  4. Done:
    import * as React from 'react'
    import Svg, { SvgProps, Circle } from 'react-native-svg'
    
    function SvgComponent(props: SvgProps) {
      return (
        <Svg height="1em" width="1em" {...props}>
          <Circle cx={50} cy={50} r={40} stroke="#000" strokeWidth={3} fill="red" />
        </Svg>
      )
    }
    
    export default SvgComponent
SVG to React API