TDCD: Test Driven Component Development
summary
Advocates TDD for React by showing a concrete workflow: write failing unit tests, use react test renderer and enzyme shallow render to assert component outputs, then implement with hooks/useState until tests go green. A small todo app grows from five listed items to six after a tested add action; tests stay green while markup and styles swap to Material UI. The claim: behavior-first tests let a working app be built and verified before visual refactoring, and it actually runs.
AI-written summary · about
chapters (13)
- 0:00Start
- 1:30Why Test-Driven Development
- 2:43Tdd Can and Should Be Fun
- 3:38Why Test React Components
- 3:56Jsx
- 5:07How To Test React Components
- 6:16React Test Renderer
- 11:17A Failing Test
- 13:15Syntax Error
- 15:10The Green Step
- 16:51Optimize the Code under Tests without Breaking the Test
- 25:09The Hooks Api
- 30:01Visual Refactoring








