Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Hooks are not meant to replace classes, or lets call them screens (the ones that the user will interact with)
They are made to take away the need to create an entire class of a Component for example for text fields, toolbars, and any other object that is a part of something bigger.
When you need to dive into lifecycle handling and have a complex scenario to work with in your screen, hooks will fuck things up as they are function components and, and functions have one responsibility.
Zy--2474d@gitpush My problem is that the React team has said that in the future, they imagine all components will be written with hooks.
So, to my mind that implies that they think hooks will be naturally and obviously preferable to classes in all scenarios.
When typical tutorial-fodder like a timer requires diving into creating custom hooks, using refs, negotiating closures and knowing the rules of hooks (or installing someone else's hook as a package - LOL?!) this statement makes me scratch my head.
ArcaneEye16474di thought i was going to have to learn JS sooner or later...
and along comes Razor :D
Your Job Suck?
Take a quick quiz from Triplebyte to skip the job search hassles and jump to final interviews at hot tech firms
Get a Better Job