← Graph

Use generic and object-specific ViewComponents together

takeaway 2 connections

Build two kinds of ViewComponents: generic ones that accept parameters like color/size/label, and object-specific ones that accept a record and encapsulate the full rendering logic (conditionals, collections) for that object — keeping it out of decorators or the model.

type
recommendation
takeaway Use generic and object-specific ViewComponents together
about
Component design recommendation.
takeaway Use generic and object-specific ViewComponents together
from_talk
Reported pattern after 18 months in production.

Provenance

Read by
3 extractions