The how's and why's of flexible React components
summary
Refactor of the class pass schedule CTA reduces fragility: a tangled component with embedded rules and 14 props becomes an API that takes a single type prop, implemented with a tiny base plus separate CTA components, cutting from 14 props to 4, enabling isolated tests, per-CTA behavior and simpler A/B changes. Business logic moves to plain functions and optional render props so rendering stays declarative and low-magic.
AI-written summary · about
chapters (9)
- 0:00Start
- 2:00Tooltip
- 7:16Is this Component Flexible
- 10:08Putting Business Logic in Your Components
- 11:55Schedule Cta
- 15:38Children Prop
- 23:22Render Props Pattern
- 25:39Downshift Library
- 27:01Know Your Traps








