News for hackers. Stuff that matters.
Re:React v18.0 by neals on Tuesday March 29, 2022 @01:25PM (#30845669)
Fun fact: I started building a couple React apps 5 years ago. Apps still run, but since they're class based component and don't use hooks, the apps feel like ancient. They run perfectly fine though. New guys don't really want to work on in though. Hooray for progress.
Re:React v18.0 by goodoldneon on Tuesday March 29, 2022 @03:36PM (#30847339)
If you'd like to migrate them, the React team maintains some awesome codemods:

https://github.com/reactjs/react-codemod

Re:React v18.0 by Beowolve on Tuesday March 29, 2022 @07:58PM (#30849901)
I still wish they maintained ESLint rules to help auto fix things instead of codemods.
Re:React v18.0 by TurningCanadian on Tuesday March 29, 2022 @03:03PM (#30846939)
FYI IntelliJ/WebStorm has a refactor option that automatically converts class-based components to hooks and vice-versa.
Re:React v18.0 by crummy on Wednesday March 30, 2022 @02:30PM (#30858996)
Does it? I know it can go hooks -> class but haven't been able to get it to work the other way around.

edit: You can go both ways, if your class component is simple enough.

Re:React v18.0 by franciscop on Tuesday March 29, 2022 @09:05PM (#30850377)
For few hundred $ you can get that converted to hooks, depending on the app complexity. I'd offer it myself if I didn't have a fulltime job currently.
Re:React v18.0 by ab-dm on Tuesday March 29, 2022 @05:15PM (#30848466)
Same. Every time a new version gets released I feel a pang of guilt for that poor codebase, but it's been jogging along for 5-6 years with minimal updates and it works like a charm. Fairly big code base as well.

I did upgrade from react-router v1 though... declaring routes as JSON just felt a bit too gross.

Re:React v18.0 by zdragnar on Tuesday March 29, 2022 @02:13PM (#30846332)
Fun fact: very few developers (especially newbies) enjoy working on legacy projects.

New features push the business forward, lets you learn faster, you aren't constrained by the garbage someone else wrote years ago but don't have the budget to change, and it looks better on a resume in an industry where the average term of employment is 2 years because new hires get bigger pay bumps than annual raises give.