News for hackers. Stuff that matters.
Re:Rich Harris joins Vercel to work on Svelte full time by phist_mcgee on Friday November 12, 2021 @06:02PM (#29205516)
It's very easy to convert a hook to a HoC, purely wrapping that functionality in a class component.
Re:Rich Harris joins Vercel to work on Svelte full time by TranquilMarmot on Saturday November 13, 2021 @12:17AM (#29207598)
Also true. It just seems like `class` has become a bit of a dirty word, at least the last two places that I've worked on React codebases.
Re:Rich Harris joins Vercel to work on Svelte full time by phist_mcgee on Sunday November 14, 2021 @03:47AM (#29216122)
I agree it has. I think this is because hooks have been talked about by facebook as the future of react. There seems to be no appetite for class based react improvements in the future. No wonder people move to the thing that will be better supported, regardless what it is.