3 ms·
That’s not really my point. All of these icons will cost you 5ms at worst. Should we make that tradeoff in the first place? The article present this as somethin
by Aeolun 3y ago
That’s not really my point. All of these icons will cost you 5ms at worst. Should we make that tradeoff in the first place? The article present this as something you must do, or else you don’t care about your users. But as someone else points out elsewhere, including the icons in your code means no lazy loading, so everything is either instantly there or not at all. That’s a much bigger user benefit than a minimally faster bundle load.
I just don’t see a convincing (concrete) argument in this article.
- afavour 3y ago> But as someone else points out elsewhere, including the icons in your code means no lazy loading And if you check the replies you’ll see examples of other, more efficient ways to do the exact same thing. It speaks to a bad level of myopia in the React community that when presented with the challenge of “put statically rendered markup in HTML” the accepted solution is “take that markup, transform it into a bloated JS representation, transform it back to markup during server side render while also shipping the bloated representation in the client JS, then unnecessarily hydrate that representation on page load” and no one sees any problem.
- pas 3y ago... getting the job done is usually the first priority. wasted CPU cycles are comparatively cheap. just as experienced devs, who can write more optimized code are expensive. of course if what the HTMX cult is chanting is true, then the best way to get the job done and save cycles is to skip as much of the frontend dev stuff as possible. (though this would probably lead to the problem of how to hire a dev versed in the occult.)
- Aeolun 3y agoYou are making things harder than they are. I ship the representation to the client once (as a JS string) and then render it there as many times as I want. No SSR involved.