4 ms·
Hooks is something I found no problem understanding. That's in total contrary to majority. This makes me wonder if I did really understand it.
by mesaframe 6y ago
Hooks is something I found no problem understanding. That's in total contrary to majority. This makes me wonder if I did really understand it.
- kayodelycaon 6y agoI don't think there's a lot to understand. The issue is classes and hooks deal with complexity the in opposite ways. Working with hooks drops you into programming with functions instead of objects. The component lifecycle in the background rather than foreground and state becomes spread out into different layers of functions instead of centralized. They are two very different modes of thinking. I came in very late to React. After digging through the classes I inherited from a previous developer, I was struggling to understand what was happening. After reading up on hooks, I immediately got what React was and was able to understand classes better. Of course, now the app has both classes and hooks. Any future developer who comes along will have fun with that.