Keep your state externally and just grab what you need on each subcomponent with the `connect` function from `react-redux`. Easy peasy front-end development.
For example, you can have a date picker that just accepts variables to display the current state and parent component that reads data from the store and passes it into the date picker component.
This method is also great for debugging, since you can just replay the state transitions over again if there is an application error. If the component holds the state, then it can be cumbersome to reproduce the error.
if you have no state in the component that would not be possible. you can also not wrap this with an other component that can hold this state because you don't want components with state. that means all behaviour that requires state would have the state in the store this will just be crazy
Most of the time it mirrors the structure of a file system which is the exact way (almost) every program is written.
As with most software projects, keeping organized is like 80% of the battle.
At least for me hooks dramatically clean up the code.
Outside of error boundaries (I think those still have to be classes) any new component for me is a function component and if it needs state, has hooks.
Granted I still maintain a lot of class components back from before the days of hooks.
For simple components hooks may be fine. For more complex ones I prefer classes.
https://reactjs.org/docs/hooks-reference.html#useref
The example even uses .focus()
In the end, they are just another tool -- knowing how to use the tool appropriately is the critical part.
During this time, I started playing around with React and I thought, I learned my lesson, it's class-based components all the way. Yet again, the community started going to "other" way with function-based components and I was steadfast in my attachment to classes - refusing to budge.
Of course, I eventually made the switch and wish I had done so sooner. Once you get the hang of hooks, they're so much easier to reason about and, as you said, make me much more productive.
However without hooks, only class based component has side effects and lifecycle, so you like it, then made switch to hooks because it's neat.