title: Reactjs - Get a component from anywhere in the app
body: <p>I'd like to know if there is a way to get a component by using some type of id, or by type, similar as you would do in DOM manipulation. Something like:</p>
  
  <pre class="lang-js prettyprint-override"><code>var Avatar = React.createClass({
      render: function () {
          ...
      }
  });
  React.renderComponent(Avatar({id:'avatar'}), ...);
  ...
  ...
  var avatar = React.getComponentById('avatar');
  avatar.setProps({url = 'http://...'});
  // or
  var avatars = React.getComponentByType('Avatar'); 
  if (avatars.length) {
      avatars[0].setProps({url = 'http://...'});
  }
  </code></pre>
  
  <p>I don't want to keep references of components instances...</p>