Image for post
Image for post

Today I would like to talk about a component-based approach to writing views on Ruby on Rails applications using View Components.

What are View Components?

View Components is a new approach to programming views invented by GitHub. View Components are Ruby classes that can return HTML. This is a new vision of the presenter pattern. View Components is provided as a gem and it has detailed documentation. While writing this article the gem is being developed. But nowadays many people use this gem in production, including GitHub itself.

Let’s turn to the documentation itself for a better understanding of why View Components are needed, and when they should be used. …

Ramilya Nigmatullina

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store