Refactoring Volatile Views into Cohesive Components
summary
Views become volatile and are refactored into concrete components using the ViewComponent gem; a messy tab bar that changed 7 times is rebuilt as a bar component plus three concrete tab types with polymorphic slots (link, disabled, drop‑down). The demo implements counters with a threshold 15 tasks, a pro‑plan disabled tab with tooltip, a searchable extra area, collection rendering via with_collection, and component previews so the refactor actually simplifies testing and reuse.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 2:04Volatile views and UI elements
- 5:16View components as solution
- 14:12Tab nav complexity case study
- 20:12Refactoring tab navigation bar
- 23:30Why view components
- 25:36Component extraction steps
- 26:39Resources and alternatives
- 27:21Q&A








