4 ms·
> These APIs are exported from the react package You can still write React the old way.
by rozenmd 3y ago
> These APIs are exported from the react package
You can still write React the old way.
- trgn 3y agoSure. 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.