I'm writing new code with hooks. My old projects still have classes. They work perfectly fine, why waste time changing them? In general I'd only convert working code when the benefits outweigh the cost.
I've never really liked having two types of components. I've had several cases when adding a new functionality meant moving the state up or down the hierarchy. Refactoring a class component into a function component (or vice versa) is a pain. At least with hooks it's not an issue anymore. I'm not 100% comfortable with the magic behaviour that come with hooks but I like having code that refactors easily.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'm writing new code with hooks. My old projects still have classes. They work perfectly fine, why waste time changing them? In general I'd only convert working code when the benefits outweigh the cost.
I've never really liked having two types of components. I've had several cases when adding a new functionality meant moving the state up or down the hierarchy. Refactoring a class component into a function component (or vice versa) is a pain. At least with hooks it's not an issue anymore. I'm not 100% comfortable with the magic behaviour that come with hooks but I like having code that refactors easily.