News for hackers. Stuff that matters.
Re:Vanilla-todo: A case study on viable techniques for vanil... by futureproofd on Tuesday October 27, 2020 @10:30AM (#24907762)
Agreed with "the modern way" to rewrite React code. Not simply for the sake of keeping current with version changes, but for one, to make sure your engineers are not constantly switching mental models between React Classes, HOCs, and Effects.

Another reason is the ease and speed of online documentation/resources. We all use StackOverflow to get answers and insight into problems we face on a daily basis, and as the framework (or library) progresses, the majority of Q&As adopt it, giving us a wealth of resources at our disposal.

Re:Vanilla-todo: A case study on viable techniques for vanil... by debaserab2 on Tuesday October 27, 2020 @11:12AM (#24908166)
Is the mental model switches between classes, HOC's, and effects really that taxing? Rewriting your code to match the current framework flavor is really less exhausting?
Re:Vanilla-todo: A case study on viable techniques for vanil... by lazyasciiart on Tuesday October 27, 2020 @12:01PM (#24908722)
One time work to get knowledge outside your head vs mental notes for context switching while you code? For some people/projects, the first one would be much easier.
Re:Vanilla-todo: A case study on viable techniques for vanil... by nicoburns on Tuesday October 27, 2020 @12:21PM (#24908918)
Personally I don't find hooks vs. classes much of a context switch. The mental model for the component lifecycle is more or less the same, it's mostly just a different surface syntax (there are a few extra rules for hooks like not putting them in conditionals, but you'd have those in a pure-hooks setup too).
Re:Vanilla-todo: A case study on viable techniques for vanil... by debaserab2 on Tuesday October 27, 2020 @12:36PM (#24909085)
If you understand each approach well enough they aren't context switches at all - they're just different tools for solving a similar problem. If anything, understanding each of them gives you a better understanding of the approach your team has converged on.