3 ms·
React itself was class based in the beginning, and that would have probably been a better model in the long run - it was a lot more code for sure, but less comp
by ricardobeat 1y ago
React itself was class based in the beginning, and that would have probably been a better model in the long run - it was a lot more code for sure, but less complexity.
- no_wizard 1y agoThis is definitely debatable. I grok the composable functions model quite well, and hooks let you separate logic out of components extremely well and intuitively once you understand the basics of React. By comparison, I feel class component's promoted 'mile high' components where everything was inside of the class, which has many enormous drawbacks, one of the biggest being maintainability. To this today though, I feel most people don't understand the simple rule of UI is the last mile concern. Developers still cram way too much into components rather than separating layers of concerns