|
|
|
|
|
by shmde
985 days ago
|
|
I started off with hooks and started learning about class components just to clear interviews and damn it provides clarity of when, how components are gonna re-render. If you can get past the HOC hell hole and the "this.add = this.add.bind(this)". I felt it made it very clear how and in what order things run. Its definitely true when OP said if things did not get so clear with class components we would never have gotten hooks. |
|
I'm sorry, the entire community rallied around hooks PRECISELY because the life cycle methods were not clear and were very problematic.
It seems extremely strange to see such opinions.
When you see a hook you know exactly when it's going to execute and why and because of what. You don't have to layer the methods with tons of checks making sure the life cycle method has been run in the right context, it literally just works.