c8r / pixo

Convert SVG icons into React components
MIT License
365 stars 10 forks source link

Difference with Babel plugin? #9

Open juandc opened 6 years ago

juandc commented 6 years ago

I've always used the Inline React SVG plugin for using SVGs in my Reactjs projects.

So, in simple words: Why should I use pixo for converting my SVGs to React Components instead of using directly the SVGs with the babel plugin? Is there an Advantage or is just an alternative?

jxnblk commented 6 years ago

Haven’t used this personally, but sometimes it’s nice to build a package of icon components from SVG files that is consumed by other apps. Seems like the Babel plugin doesn’t have a template option either, if I’m not mistaken

jxnblk commented 6 years ago

Also this uses a different/simpler/more limited optimization strategy than svgo