4 ms·
But anchors and hyperlinks mean I make a new HTTP request to download the full page content, and make the browser re-draw only the parts that changed[1]. On th
by quectophoton 2y ago
But anchors and hyperlinks mean I make a new HTTP request to download the full page content, and make the browser re-draw only the parts that changed[1].
On the other hand, with something like react-router you can now just download the full page content[2] but without <head> [3], and then make the browser re-draw only the parts that changed.
Only half-joking though. People can build things whatever way they like, and these frameworks can have good trade-offs. But sometimes the justifications devs give[4] just sound like they're reluctant to say "because I already know it, so I'm more efficient with it" or something like that.
[1]: "Paint holding".
[2]: Code splitting.
[3]: These savings are probably offset by the library's 19kB, anyway. Or with that small icon that was inlined as base64.
[4]: Which they don't need to give to anyone, unless it's for a situation like an employer asking for it.