Using lifecycle methods provided by the framework has several advantages over relying solely on callbacks:
Better organization and separation of concerns: Lifecycle methods allow you to keep your asynchronous logic separate from the rendering logic of your component, resulting in cleaner and more maintainable code.
Simplified error handling: Frameworks often provide error-handling mechanisms within their lifecycle methods, making it easier to catch and handle errors that occur during asynchronous operations.
Improved control flow: Lifecycle methods ensure that asynchronous operations are performed at the appropriate times in the component's lifecycle, avoiding race conditions and other issues that can arise with manual callback management.
In What is the purpose of callback function as an argument of setState(), it was mentioned
I never saw this saying anywhere, could you provide the reason why?