Interview practice question
Modernising a codebase full of class components
Frontend Engineering · React · Experienced
Your codebase has hundreds of class components with lifecycle methods. Should you convert them to hooks, and how?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Not required; class components still supported.
- Convert when touching code or for clear benefit.
- Map lifecycles to effects carefully.
- Tests before refactor.
- Prioritise shared/frequently changed code.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.