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.
- On mobile, using menu to search in browser menus.
- When users use F3 to search, an alternative to ctrl+f.
You added a few bytes to reimplement a browser feature, and spend time on a feature that already exist, because of your tech choice. There is still probably some accessibility issues.
You can have easily 60k rows in HTML without any performance issue, you just need to pay attention...
"On mobile, using menu to search in browser menus" -> This is not a sentence.
I do add a "few bytes" to "reimplement" a "browser feature" ; but the reality is that i HAVE to implement search because it is hitting on 730000 per year records;
How is you ctr-f or f-1 feature is gonna search on 2190000 rows in 3 years ?
Again, you are too happy about your opinion that you spite it out like truth without even understanding specs.
Specs is what allow you to understand what's required, it makes no sense what so ever to talk about technology without understanding WHY you use it in the first place.
Is it meant for public ? employees ? How many rows do they deal with in their actual everyday workflow ?
You are pushing your workflow so much that you don't even consider about your users and that's another red flag for me.
PWAs have given so much in term of capabilities and mastery that I honestly wonder why I'm still talking about such things on HN while proper workflow about architectural design are ignored here.
" but the reality is that i HAVE to implement search because it is hitting on 730000 per year records;" -> True, there should be a search feature with a backend API.
"Again, you are too happy about your opinion that you spite it out like truth without even understanding specs."
Yes I want too far, your use case does require extra logic, because it's not good to send that much data to the user. I'm not pushing a workflow, im not a front end dev, but i do maintain frontend apps sometimes, i'm simply angry at React, because it cause pain to me as an user.
It's noticably slower (https://medium.com/dailyjs/a-realworld-comparison-of-front-e...).
The virtual list may be required for your use case, but as a user, I often met virtual list:
- Used for less than 100 elements
- ctrl f is not hooked on the 'webapp search feature'
- the 'webapp search feature' is noticably slower than the browser.
Also, here some reading, from a framework I don't use, about the virtual dom:
https://svelte.dev/blog/virtual-dom-is-pure-overhead
Now, not as an user, but as a software engineer, my soul cry when I see the architecture principle of such a framework fixed with a workaround.
I'm actually more of a preact fan and the community Jason Miller has created, their work have inspired me a lot in concern of front-end and javascript dev.
ctrl-f hook is effectively something that has to be considered when implementing such feature.
I'd argue that the list & search feature it self is hard, not as something to put on and program and get working, but as a user-experience and design perspective (I'd like to thank you about pointing that out by the way, I will definitely spend some time making sure it's there for my app)
The reason I can think of, is that we do actually take control over parts of the applications in a way that was not imagined when browsers implemented search function.
It almost feels like the "With big power comes big responsibility", but i don't like the word "power" in our case, so I'd change it to something alike to "With features that have extra consequences we need to have an equal amount of extra care to even considering them." as if it was hidden and we needed to understand the tool better to have it properly done.
I guess front-end dev is easy to get in and understand, but hard to master, and that could be why we end up with these rampant "half-done" apps that do not take those extra steps.
In the end, the rushed dev will probably just look to have it's app working and will not check these kind of "bugs" that have been caused by his decisions,
Tbh, without this discussion i'd probably have missed it too
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?