DEV Community

loading...

Discussion on: Do you still use React classes?

Collapse
crowdozer profile image
crowdozer

I do have quite a few class based components laying around in my code, but I've almost exclusively used functional components ever since hooks released. I don't go out of my way to refactor class based components into their functional counterparts, but I won't write a class based one unless it's absolutely necessary. There are a few packages I depend on that require class based components to function properly. The use case is so far and few between though.

To be honest with you, when I'm asked to make a change to a particular feature and I open up the file and see a big ol class... it scares me a little.