title: React different representations of same data, parametrize container component render
body: <p>Is it an antipattern to return different <em>representation component elements</em> from <em>container</em> based on some <em>condition variable</em> passed to the container?</p>
  
  <p>I have routes for <em>SummaryPageComponent</em> and <em>CustomersPageComponent</em>. Summary page has a partition which presents chunk of the same data that Customers page shows in more detail. It would be redundant to create two <em>distinct</em> container components containing the same data and logic just to pass that data to different representation component. Including logic to representation component isn't an opinion either.</p>
  
  <p>So my question is, would it be acceptable to create a container component which returns either <code>&lt;CustomersSummaryComponent&gt;</code> or <code>&lt;CustomersDetailsComponent&gt;</code> based on some prop (<em>summary=true/false</em> for example) passed to it? That way I could include the Customers domain anywhere in my SAP and parametrize it's presentation the way that fits. Is this advisable or does it make code too hard to maintain?</p>