🌠 The best icon pack in the world right now, IMO, is Lucide (lucide.dev). It builds on @colebemis.com’s incredible work with Feather Icons, extending it from ~300 icons to >1500. It has fully-typed bindings for React and many other frameworks. And I just found out: they’re even more optimized! 🧵
Post
Unfortunately, their React package (and others too I imagine) are rendering SVGs via JS(X) which is a very, very bad idea. Runtime perf & memory use take a hit that can be completely avoided with other techniques; far better to use <img> or <use>.
0 reposts2 likes
Do you have examples of where this actually causes noticeable perf issues? Because I’m using it on my blog and it’s totally fine. <10kb added to my bundles, even before gzipping. And unlike <img>, it requires no extra network requests to fetch the icons, they’re inlined in the server-generated html.
For me it’s a death-by-thousand-cuts type thing, so if there’s low-hanging fruit for keeping the payload small I’ll try to take it from the start. I stole a script from @kentcdodds.com Epic Stack that converts and optimizes them for me so I rarely think about it!