@nicom
Stop using "handler", "manager" or any word that has generic meaning in your classes/functions/component/variable names.
Favour explicit and precise action verbs that really tells what will be done.
Example:
- DO NOT write "errorHandler(error)" if your function logs the error or displays an alert.
- DO write "logError(error)" or "alertError(error)"
You don't know if the behaviour will change in the future so you want to plan for all possible cases by using meaningless words?
Know that nothing you can do today will fit any decision you will take later.
Even if you plan well, there's 0% chances that your code will not be completely trashed, or heavily refactored. You will never benefit from your planning. Ever. (trust me after 25y here, it never happened).
But instead, meanwhile, you suffer every day from the lack of meaning of your naming and make your code unclear and confusing.