6 ms·
Whether or not JS-SSR with hydration is performant is an interesting topic, but sort of misses the forest for the trees, no? The thread you link to is about a p
by gnalck 6y ago
Whether or not JS-SSR with hydration is performant is an interesting topic, but sort of misses the forest for the trees, no? The thread you link to is about a post which speaks about whether that extra level of complexity is even necessary for many use cases (it isn't).
HTML + JQuery, which the hydration approach is compared with, is not used for performance reasons per se. It's used because its easier to reason about and the incremental interactivity that something like JQuery brings to HTML is better than writing your entire frontend in React for something as simple as a blog, for example.
- leeoniya 6y agoit does not take much complexity to start feeling the pain of jquery-style imperative DOM sync & manip. you don't need to go too far past "simple blog" for this to become obvious. FWIW, the linked site is built with a 300 line custom build script, Rollup, Buble & Terser - even the dev dependencies are extremely minimal. no, it doesnt have the latest HMR hotness, so the DX could be a bit better if i wanted more bloat.
- manigandham 6y agoThis kind of progressive enhancement but with the latest JS frontend component models is where Vue shines. Vue 3.0 will be making it even better and faster.
- searchableguy 6y agoYou don't need jquery in most situations unless you are supporting old browsers. Modern js is good enough. At best, you will end up writing a few lines to abstract what jQuery abstracts away from you.
- leeoniya 6y agoif you still want jquery in 2020 (and that's ok because raw DOM apis still need sugar), for the love of god please use https://umbrellajs.com/ https://umbrellajs.com/ instead. it's like 1/10th the size, api-compatible and well-architectured.
- biggestlou 6y agoOr AlpineJS
- deleted 6y ago[deleted]
- whycombagator 6y agoReminds me of https://github.com/madrobby/zepto https://github.com/madrobby/zepto
- manigandham 6y agoAnd cash: https://github.com/fabiospampinato/cash https://github.com/fabiospampinato/cash
- gnalck 6y agoThis is pretty neat! I was just looking around for a "modern, smaller" JQuery equivalent and did not come across this. The older equivalents in this space I saw were Zepto and Cash. Out of curiosity, what do you think of Alpine.js and Stimulus.js, which come to mind when I think of smaller utility libraries for adding "sprinkles" of JS?
- leeoniya 6y ago> Out of curiosity, what do you think of Alpine.js and Stimulus.js no experience with those, but if you're feeling masochistic, try these: https://github.com/finom/balalaika https://github.com/finom/balalaika https://github.com/finom/bala https://github.com/finom/bala
- earthboundkid 6y agoI have been using Alpine and enjoying it. Stimulus is too much like Rails—convention over configuration—for me to get into. Alpine feels like a nice middle ground between Vue and Vanilla.
- 6y ago