Comment on Which side are you? Javascript or Typescript

<- View Parent
SnowdenHeroOfOurTime@unilem.org ⁨1⁩ ⁨year⁩ ago

What’s the difference

Your code reads like it’s from 1992 mainly, which makes sense I guess, given that you still find jQuery better than modern vanilla js. jQuery was created as a way to account for browser support challenges but is now obsolete. Anyhow, if I read “getElementById” in recent js code I would assume something was weird about that code. It’s old hat and there is rarely a reason to use it.

What is the right way is context dependent

Precisely my point. Which is why I think it’s opinionated in a bad way to arbitrarily pick one of them as the defacto. I often had trouble with jQuery’s .hide() method because while it felt natural to use it, but often conflicted with what actually needed to happen for good UX.

source
Sort:hotnewtop