3 ms·
You can, yes. But the developer working on the codebase you’re going to inherit might not. Class components are usefully opinionated in that way.
by untog 6y ago
You can, yes. But the developer working on the codebase you’re going to inherit might not. Class components are usefully opinionated in that way.
- oaxacaoaxaca 6y agoYep. And isolated functions are a solution, but sometimes it just makes way more sense for that function to be a method of a class. And for the function component to be a class component. I think there's space for both types of components, and I just hope that class components don't become deprecated.
- nightski 6y agoAbsolutely there are cases where class components make sense. I highly doubt they would ever depreciate them.