Why would you not want to be using a rendering library? Your code is basically storing your application state in the dom which will turn into a horrible mess as soon as you reach any actual level of complexity. I know first hand. I’m traumatized from having to maintain large jquery code bases in the 00s. No serious professional writes code like this anymore.
Also, your vanilla code isn’t modern. It should look more like this:
I could see not wanting to use a rendering library if you’re building a simple site on top of basic static HTML, but that’s not a serious discussion for industry professionals, and even still, jQuery is such a heavy dependency for saving some characters. If you find yourself using it so much you need the extra convenience then your site is already complicated enough that you should be using a rendering library with state management instead.
Why would you not want to be using a rendering library?
Because it’s just not very useful in some contexts. I’ve seen web extensions which mostly query the current page, and it doesn’t render much or even anything.
Not all pages are SPAs either. Many apps are the old request-response with some dynamic behavior sprinkled on top. jQuery covers that well.
This model is also quite compatible with the rising HTMX where the state/rendering is driven from backend and you just insert few dynamic pieces with JS.
There’s no difference between document.querySelector(“#element”) and document.getElementById(“element”), they’re both same level clunky.
Also, what you wrote is not functionally identical. $el.show() is idempotent, the el.toggle(“hidden”) is not (as the name suggests, it toggles a class). It also needs an extra boilerplate class.
I could see not wanting to use a rendering library if you’re building a simple site on top of basic static HTML, but that’s not a serious discussion for industry professionals
There are plenty of non-professionals doing web stuff and I think it’s great!
jQuery is such a heavy dependency for saving some characters
jQuery is 24 KiBs (minified, gzipped), that’s a good price for the egonomics it provides. If you’re constrained, there are API-compatible alternatives like cash which go down to 6KiBs.
Da har element kommet ut med en alternativ app som heter element x. Den har en annen layout og er i beta-utgave. Fokuset på denne appen er å være super responsiv. Virker veldig bra, og har boble-chat.
Bloble-chat og layouten som er der, er dét jeg har slått på i instillingene for vanlig element for tiden. Så det er ganske så sikkert at element x blir den nye matrix appen min.
After iOS, Element X beta is now available on Android. Go rush it, break the app, report bugs, let's all get fun together! Oh, and it's extremely fast, don't be surprised.
My son friends and their parents recently joined @element with their Android phones.
Two of them created accounts with the Google SSO support, but when they joined a encrypted room - the top of the app was filled with a warning about "key backup", when clicked - nothing happens.
Have anyone else noticed this bug?
Kinda annoying and not a good onboarding experience for new users :/
#MinCup23 is coming fast and we’re scrambling to get ready. Our website has this year’s mineral list, starting bracket, and even a test vote if you want to warm up your polling muscles: https://www.mineralcup.org/
@gael@telegram@signalapp@matrix Useful easy to follow discussions are difficult without threads/topics like #discourse forums or even email threads. I heard #Matrix or #Element supports or will support threads but haven't encountered them in any groups yet.
Do you delete your devices often, like everyday? Dehydrated devices allow to keep receiving encrypted messages in a decentralised network with virtual devices.
I inquired about disabling presence information in #Matrix#Element desktop on #privacy grounds (it amounts to location tracking if, for example, you have home and office sessions, and while Matrix session names can be private, session existence cannot), and was told that "its low priority given most servers have presence entirely disabled, like matrix.org".
This is very disappointing, although I don't know how official that stance is. I've asked my admin to look into disabling presence.
Which side are you? Javascript or Typescript (i.postimg.cc)