this post was submitted on 02 Apr 2024
13 points (100.0% liked)

JavaScript

1982 readers
1 users here now

founded 1 year ago
MODERATORS
top 12 comments
sorted by: hot top controversial new old
[–] onlinepersona@programming.dev 2 points 7 months ago (2 children)

Basically reactifying JS? I've found it very hard to read react code and find out where an event / signal comes from. Somewhere, something changes and at some other place it has an effect. Probably because I abandoned JS a long time ago, I'm not up to date on the advantages of react, but JS nowadays has never been harder to read.

CC BY-NC-SA 4.0

[–] SatouKazuma@lemmy.world 2 points 7 months ago (1 children)

JS just feels like anarchy to me with how certain events/methods work.

[–] onlinepersona@programming.dev 1 points 7 months ago (1 children)
[–] SatouKazuma@lemmy.world 1 points 7 months ago (1 children)

Okay glad I'm not insane. I gave up trying to learn JS because of that.

[–] onlinepersona@programming.dev 2 points 7 months ago* (last edited 7 months ago) (1 children)

The problem is that browsers all decided to solve problems differently, then nodejs came along with ideas that browsers couldn't implement easily (modules for example). To get around that, people wrote "polyfills" but each polyfill did it differently again. So, javascript builders were introduced that automatically inserted polyfills or rewrote javascript code to work on the server and in the browser and they had different solutions.

Of course browsers work differently and have different features, so libraries specialised in exploiting those differences came up and became popular.

Now in an effort to reduce differences, the "best" solutions (aka the most widely used which of course doesn't mean best) are being integrated into the language. Promises, modules, String functions, classes, typing, etc.

It was a grand mess long ago and it seems to continue to be that way.

CC BY-NC-SA 4.0

[–] SatouKazuma@lemmy.world 2 points 7 months ago (1 children)

Jesus fucking christ...sounds difficult enough. I've literally had an easier time learning Mandarin.

[–] onlinepersona@programming.dev 1 points 7 months ago (1 children)

I'd rather learn mandarin too than get up to speed with JS 😂

[–] SatouKazuma@lemmy.world 2 points 7 months ago (1 children)

Ha. Like I said, there's a reason I straight up quit trying to learn JS. I see other devs working in it and I'm just over here like "what the fuck is that sorcery?"

[–] themooserooster@mastodon.social 2 points 7 months ago (1 children)

@SatouKazuma @onlinepersona

Just read The Good Parts. No really, There's a book called JavaScript: The Good Parts and its still the foundational text of the language.

[–] SatouKazuma@lemmy.world 1 points 7 months ago

Thanks for sharing!

[–] victorz@lemmy.world 1 points 7 months ago

No, not reactifying JS. That's not the intent of this as I interpret it. Take a moment to read through the whole thing and I'm sure any fears you have about this should go away. This is mainly for framework authors, rather than application developers. A standardized and optimized way to code reactivity, reducing framework bundle size, reducing bugs, among other things, no need for weird hooks or Proxy objects and things like that. Good stuff.

Maybe even one day React will have property support.

[–] rglullis@communick.news 1 points 7 months ago

H/t @pimterry@toot.cafe