3 ms·
Sure. But search anything about React, and you'll see examples in hooks. I don't even understand the reason why class-based is "legacy". Why are hooks inherent
by trgn 3y ago
Sure. But search anything about React, and you'll see examples in hooks.
I don't even understand the reason why class-based is "legacy". Why are hooks inherently better? Code-reuse is a factoring concern, not a paradigm concern. And component-life-cycle bugs are now replaced with nearly impossible to understand callback stacktraces.
- Capricorn2481 3y agoThat doesn't mean classes are deprecated, it means people prefer hooks, and I understand why, as someone that codes in both. It's like saying "All Javascript things I search are only in ES2020." It doesn't mean javascript is deprecating features.