News for hackers. Stuff that matters.
Re:Ask HN: Benefits of front-end JavaScript frameworks? by amerkhalid on Thursday March 08, 2018 @04:00PM (#16547590)
I see two benefits of frontend JS frameworks:

1. They are highly optimized for DOM changes. You can use plain JS or jQuery to manipulate DOM but that would get expensive.

2. They provide some semblance Object Oriented code organization to frontend.

For a simple app, these benefits probably are not worth it but for a complex app, these benefits outweigh the cost of these frameworks.

Re:Ask HN: Benefits of front-end JavaScript frameworks? by rhapsodic on Thursday March 08, 2018 @04:55PM (#16548031)
> 1. They are highly optimized for DOM changes. You can use plain JS or jQuery to manipulate DOM but that would get expensive.

I keep seeing this claim, or similar ones, postulated, but in my extensive experience, using plain JS or JQuery for DOM manipulation has never resulted in noticeably slow performance, even when there was a great deal of DOM manipulation going on.

And if that were the case, I am quite confident in my ability to optimize my own code to make it performant.

Re:Ask HN: Benefits of front-end JavaScript frameworks? by glassbordall on Thursday March 08, 2018 @05:05PM (#16548127)
Agreed. Furthermore, OO style programming is simple enough with plain JS.
Re:Ask HN: Benefits of front-end JavaScript frameworks? by ccachor on Thursday March 08, 2018 @04:24PM (#16547739)
I'd also add, moving to components doesn't rely on DOM structure either (ex. $(this).parent().parent().find(:el)...)