title: How to DRY with embed resources
body: <p>I am currently designing a REST API that will be consumed by a ReactJS app. The two actual endpoints are the following:</p>
  
  <pre><code>/species
      id
      types
          [name, name] // each specy has 2 types, contained in an array
  
  /types
      name
  </code></pre>
  
  <p>We can see that we have an endpoint that provides a list of all the <code>type</code>resources, and the <code>species</code>endpoint provides the <code>type</code> of a particular specy.</p>
  
  <p>In my ReactJS app, I am going to have a Select field that contains a list of <code>types</code> (fetched via the <code>/types</code> endpoint), and a List of all the <code>species</code>fetched from <code>/species</code>. The user will then be able to filter species by selecting a type in the Select field.</p>
  
  <p>Is it still DRY to have a list of <code>types</code> maintained in the Select component, and have the list of <code>species</code> in an array of <code>Specy</code> component ? Or should I find a way to inject the <code>types</code> fetched from their own endpoint in the <code>specy</code>?</p>