← Graph

UI Component vs Domain Component Split

concept 2 connections

Mental model Radoslav Stankov borrows from his React experience and applies to ViewComponent. Layer your components in two tiers: UI components (e.g. a `money` component that renders positive values green, negatives red, zero blue) and domain components (e.g. `product_price`, which takes a Product instance and uses the UI money component plus any domain concerns like discounts). Page-specific things like a page-header are not reusable and don't belong in either tier — they're just components for a single page.

category
pattern
about
UI Component vs Domain Component Split concept
Stankov explains layering components into UI and domain tiers.
concept UI Component vs Domain Component Split
related_to
React tool
Concept Stankov borrows from his React practice and applies to ViewComponents.

Provenance

Read by
2 extractions