ViewComponent in Rails

ViewComponent keeps Rails views small and testable by encapsulating markup and Ruby in objects you can render like partials—but with a clearer API than helper soup. On Sundae Club’s event-ticketing series, it becomes the default way to build admin UI once the app grows past simple ERB templates.

Early streams introduce the idea and walk through the official docs, including how ViewComponent compares to presenters and heavier SPA approaches. Later episodes install the gem for real, wire up a component framework alongside CSS decisions, and refactor navigation into components that carry logic—not just HTML.

If you want a single thread to follow, start with the “let’s look at Rails ViewComponent” stream for concepts, then the framework-install episode for dependencies, and the smart-navigation build for components that interact with Stimulus on the page.

Clips

Why ViewComponent fits this app

–

Reading the ViewComponent docs together

–

Installing ViewComponent and getting it running

–

Comparing component libraries and lifecycle

–

Installing the ViewComponent framework

–

Building UI components for the admin navbar

–