Do interviewers still ask about class components?
Yes. Lifecycle methods, this.setState, and the differences between class and functional components still come up, because they test whether you understand how React works beyond just writing hooks.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in Class vs Functional Components in 2025: Should You Still Learn Both?
Yes, but with different depth. Learn functional components deeply because that is what you write. Learn class components enough to read them and answer interview questions about lifecycle methods, not to write them from scratch.
Because they are simpler, have no this binding issues, and let you extract reusable logic into custom hooks. They are how all new React code is written and what the React team and ecosystem recommend.
Because you will read them in legacy codebases and answer interview questions about them. More importantly, the lifecycle knowledge, mount, update, unmount, deepens your understanding of how React works and how it maps to useEffect.
Still have questions?
Browse all our FAQs or reach out to our support team
