Why do interviewers still ask about class components?
Because these questions test whether you understand how React works beyond just writing hooks. Lifecycle methods, this.setState, and the differences between class and functional components reveal depth of understanding.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in When You Still Need to Understand Class Components in 2025
Yes. You need to understand them for reading legacy codebases, answering interview questions about lifecycle methods, writing error boundaries (which are still class components), reading older tutorials, and maintaining libraries that use class examples.
Yes. As of 2025, error boundaries are still implemented as class components, since there is no hook equivalent. If you need to catch errors in a component tree, you write an error boundary as a class component.
Yes, if you join a team with an existing codebase. Many production apps still have class components that you will read and modify, even if the team writes new code with functional components and hooks.
Still have questions?
Browse all our FAQs or reach out to our support team
