Re:React I love you, but you're bringing me down
by phailhaus on Tuesday September 20, 2022 @01:42PM
(#32915150)
Imagine trying to debug a component that both has lifecycle methods and reactive hooks? That would be a total nightmare, especially when the same state is being updated in both places (because that would have to be allowed). Going all-in on hooks means that there are two distinct, independent ways of writing components, and you never have to deal with interactions between the two.
I also don't think this would be possible. Hooks are based on closures and injected state, which you can't do in a class since separate methods won't share the closure.
Most of hooks could have been done incrementally on top of classes.