WaterBed code
summary
Argues that inherent complexity must live either in implementation or consumers, demonstrates with a reusable UI React and TypeScript Item component that grows from a single body prop to icon/count props, then shows moving complexity to consumers via an extra prop inversion of control pattern and finally splitting into base/icon/count components. Cites Tesler’s WaterBed idea and the copy‑paste origin, shows tradeoffs, and explains when to prefer encapsulation, customization, or interface segregation.
AI-written summary · about
chapters (6)
- 0:00Introduction
- 3:13Waterbed theory complexity
- 8:12Complexity in reusable code
- 12:07Managing complexity with IoC
- 16:28Interface segregation
- 19:18Conclusion on complexity and Q&A invitation
related talks
30mAtomic Design: Breaking Up is Hard to Do
25mBuilding Loveable UIs
35mAdvanced patterns in building React Components
23mBest Practices for reusable UI components
44mWriting good components
31mAdvanced Patterns - Moving Beyond Presentation and Container Components
37mBuilding Better Components — A Journey to a More Resilient Frontend
32mYou've been doing CSS wrong
