6 ms·
The statefulness of jQuery is a massive cognitive load.
by TurningCanadian 7y ago
The statefulness of jQuery is a massive cognitive load.
- tyingq 7y agoPerhaps for an SPA, though lots of what I see React used for doesn't need to be, or isn't, an SPA.
- The_rationalist 7y agoThis is far from obvious and is almost never convincingly exemplified.
- enraged_camel 7y agoIt should be totally obvious if you have written or tried to reason about a jQuery codebase that is larger than, say, one thousand lines of code, especially with multiple event listeners reading from and writing to the same pieces of state.
- acdha 7y agoHaving done this many times, my main takeaway is that storing state is what the DOM was designed to do and it’s faster than a virtual DOM.
- pixelbash 7y agoTry two way binding on nested form elements with jQuery.
- Izkata 7y agoMy philosophy in those days was that the DOM is the data store, with accessors that are only used during queries. Done this way, I'd never experienced the headaches people complain about.