Design Patterns · Middle · Question 53 of 75
What is the Humble Object pattern?
- ✓Correct answer: Keeping hard-to-test code (UI, DOM, timers) as thin as possible and moving logic into easily testable units
- 2Objects without methods
- 3A singleton with lazy initialization
Explanation
In React, a hook or pure function holds the logic, and the component just renders - so most logic is tested without the DOM.