Advanced ViewComponent patterns in Rails ViewComponents are useful if you have tons of reusable partials with a significant amount of embedded Ruby. ViewComponent lets you isolate your UI so that you can unit test them and more. By isolation, I mean that you cannot share your instance variables without explicitly passing them to the component….

Read More