in Programming, React

Transform SVG into React components

svgr is a library designed to convert your SVG files to a React component for ease of portability and quick styling (by passing in a color prop). However, there is a performance hit to consider (especially on mobile) when converting/styling SVGs like this.

Don’t want to convert your .svg to .js just to style it easier? No worries, you can always¬†restyle SVG using CSS.

Write a Comment