Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
How it feels to learn JavaScript in 2016 (hackernoon.com)
13 points by graderjs on Oct 13, 2021 | hide | past | favorite | 8 comments


I don't know; I might be old, but for a lot of _websites_, jQuery is absolutely perfect. I love jQuery for its simplicity :)


I was thinking about making a video tutorial on how to convert a React app to jQuery as a sort of satire piece but I was afraid the result might be good enough that it wouldn't come across as a joke in the end.


If it was an article, I'd read it. I might be able to get a better handle on what React is actually for.


Here's a codepen I made that briefly shows the difference: https://codepen.io/jaeming/pen/BadQvpG


oh and btw, if anyone is adverse to both jQuery and React and just wants some simple reactivity in vanilla JS, this is very easily achieved these days by just using Proxy prototype. You could build your own minimal library for simple use cases: https://codepen.io/jaeming/pen/JjybgyN?editors=1011


React is a UI framework where the view is a direct representation of the application state. A (react) component is a function (or class) that returns a UI element based on the props (state) it receives.

With React; component + props = view, this makes it easy to reason about what your UI looks like because it is a result of how you manipulate your data.

With jQuery that is more like: view = html + a bunch of (spaghetti) code. This can make it harder to reason about because you need to implement the logic to update your view and event handlers yourself.


> I used to be able to just include jQuery

I remember when I first saw jQuery feeling the same way about it that the author seems to feel about React.


“It’s 2008, no one uses script.aculo.us anymore”




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: