In this article, I share tips for writing Rails ViewComponents, based on my experience building RailsNotes UI, and other projects. If you use ViewComponents in your Ruby on Rails apps, read this article!
Viewcomponents (2)
- This article explores a dynamic nav component I built using the current_page? helper method, plus Rails' conditional class helpers. The result? A simple, dynamic navbar component, with different styling based on current page. Plus I threw in the ViewComponent version too 😉