News for hackers. Stuff that matters.
Re:React I love you, but you're bringing me down by Taylor_OD on Tuesday September 20, 2022 @12:47PM (#32914385)
I don't have a strong opinion either way but if you left React because you are frustrated with code becoming obsolete and picked up Hotwire, a significantly smaller framework, arnt you likely to run into the same problem if Hotwire doesnt end up being the next big framework?

In 5 years if no one else is using Hotwire then your code is obsolete, no?

I liked working in next.js in the past but my company was already talking about Nuxt.js when we hadnt even fully converted to next. Feels like jumping ships from a ship with some major flaws, but will continue to float for x+ years, onto a lifeboat that may or may not make it another 500 feet before sinking.

Re:React I love you, but you're bringing me down by jibe on Tuesday September 20, 2022 @12:57PM (#32914566)
In 5 years if no one else is using Hotwire

I think that's the opposite of what he is saying. Because React is updated and changes frequently, your code becomes obsolete unless you update to follow the latest changes. In theory, if everyone abandoned Hotwire, your code would never be obsolete or need changes, because Hotwire would never change. In reality, as browsers and web standards change, frameworks need updating.

Re:React I love you, but you're bringing me down by frosted-flakes on Tuesday September 20, 2022 @01:08PM (#32914699)
React doesn't change frequently though, that's the point. And it has always had excellent backwards compatibility. Class components are still fully supported, for example.
Re:React I love you, but you're bringing me down by addicted on Tuesday September 20, 2022 @01:40PM (#32915135)
React changing best practices every few years is a good thing! It means it keeps getting better.

That would be a bad thing if it meant that earlier best practices were no longer maintained. But that’s not true. Class components are still around. All official documentation continues to have class component examples and explanations (where it makes sense obviously…there isn’t any class component documentation under hooks, of course). And class components will likely still be around 5 years from now.

Re:React I love you, but you're bringing me down by ipaddr on Tuesday September 20, 2022 @01:35PM (#32915064)
React changes best practices every few years prompting many rewrites.
Re:React I love you, but you're bringing me down by forgetfreeman on Tuesday September 20, 2022 @08:09PM (#32919443)
One has to question the sanity of a rewrite launched for the sake of notional orthodoxy. If it ain't broke...
Re:React I love you, but you're bringing me down by Taylor_OD on Wednesday September 21, 2022 @10:51AM (#32925997)
Right but you dont actually have to rewrite it, correct? The updates dont break the old code. It's just not best practice anymore.
Re:React I love you, but you're bringing me down by tcoff91 on Tuesday September 20, 2022 @01:12PM (#32914752)
All the class components people wrote still work and can be maintained. React doesn't overhaul everything like Angular did. You can have function components with hooks and also have your old class components in the same app.
Re:React I love you, but you're bringing me down by 7speter on Tuesday September 20, 2022 @01:39PM (#32915122)
No ones learning class components for react anymore, and I'm not implying that class components are bad or ancient.