by onion2k · 6y ago · 0 comments
React is not "bad for users". Developers build complex, fast apps with React all the time. It can be fast, but if you make mistakes with it then it's easy to make something very, very slow.
The app I work on is huge. It's ~8MB of uncompressed React + Redux in development (much smaller in production though), and pages include a lot of assets so they can weigh in at 23MB in the worst cases. A complex page can have up to 60,000 DOM nodes under React's control with thousands of event listeners. It starts in about 3s and never drops below 60fps.
Can one really make such affirmations regarding client rendered web apps? I'm assuming these numbers aren't solely measured on localhost in some state of the art development machine/device so won't it depend on the client's machine specs, browser, usage, bandwidth, etc?
It's better for the user if the UI assumes the request has been successful and updates the UI with a temporary success state, and then undoes the update if the request fails and gives the user the option to recover their update and try again. Most of the time there won't be a problem (especially with good client side validation) so they'll never see the recover state, and they'll never need to wait for a network request to finish either. Obviously you shouldn't use that sort of UX pattern for critical things though.
Give me a clean, server-side form submission any day over the "has it worked, hasn't it?" inconsistency of SPAs.
The virtual list make ctrl+f not working anymore, and I hate every single react page using it. Suddendly, on this webpage using virtual list, you ctrl+f something, dont find it, because the element does not exist.
A vue or angular manage your 60k elements list without any issue, you dont need to virtualize your list, and the search feature your your browser keep working.
And if your don't use a virtual list, react get performance issues starts when you get only a few hundreds of elements and you want to filter them.
Also, it start 'instantly' with other frameworks, not in 3 seconds, but below 500ms.
I can just bind ctrl-f to my search feature.
Also, it doesn't take 3 seconds to load but few ms as well.
See, you don't just pick a tech, you need to start from the specs and get what the user need.
Also, in pure HTML (because i tried it) ; the same rendering would be hanging anytime you try to act on something.
That's pretty impressive, I've run into perf issues with far fewer actual DOM nodes than that!