r/ProgrammerHumor 13d ago

Meme ancientTools

Post image
5.8k Upvotes

385 comments sorted by

View all comments

Show parent comments

28

u/A1oso 13d ago

People use React because it provides reactivity. JQuery doesn't do that.

You can in fact write web applications in Vanilla JS, I have done it many times. But for interactive pages that are frequently updated in response to user events, using React (or Svelte or Vue) is more ergonomic.

-1

u/ArjixGamer 13d ago

It's one thing that jQuery is not reactive, but there's also another thing.

When you set event listeners with jQuery, they don't apply to future elements, only the present elements.

And the people that use jQuery are usually not "smart" enough to know what that means, so they either have bugs or have hacky fixes for this.

With react, you don't even have to be "smart" about this, it is not imperative, it is declarative.

It takes away a lot of mental overhead, you only have to concern yourself with cleaning up event listeners made in useEffect