title: ReactJS: How do I sort an array of objects based on value of props?
body: <p>I have an array of React objects and I want to sort them based on value of one of their props.</p>
  
  <pre><code>var arr=[];
  arr[0] = &lt;Fruit name="orange" count={10}/&gt;
  arr[1] = &lt;Fruit name"apple" count={5}/&gt;
  </code></pre>
  
  <p>Is there built in React function that I can use to sort this array in ascending order of fruit <code>count</code>?</p>