Of course, the only question is in what way the programming language pushes you. You can TS code where every variable is assigned “any” type, that would void all type safety. Is it possible? Yes. But someone needs to bend the languages will to do that.
Classes have inherent state, and methods which encapsulate logic. That pushed you to create separate logic bundles.
Functions are callable scripts. There are no rules. I’ve seen too many components that invoke tens of hooks, and hundreds of lines of state management. Most classes I’ve seen never reached that. Were there classes that were too big? Of course, but at least there was logic separation with methods.
You can write spaghetti with class components, too. Doesn't sound like a hooks issue to me.
Of course, the only question is in what way the programming language pushes you. You can TS code where every variable is assigned “any” type, that would void all type safety. Is it possible? Yes. But someone needs to bend the languages will to do that.
Classes have inherent state, and methods which encapsulate logic. That pushed you to create separate logic bundles.
Functions are callable scripts. There are no rules. I’ve seen too many components that invoke tens of hooks, and hundreds of lines of state management. Most classes I’ve seen never reached that. Were there classes that were too big? Of course, but at least there was logic separation with methods.
I certainly can, but somehow it cooler to write lambdas upon lambdas, and other Haskellisms when using hooks.
I think we're just gonna agree to disagree. Cheers.