title: react.js: removing a component
body: <p>I'm fairly new at react.js, so any help is greatly appreciated.</p>
  <p>I have this: <a href="https://jsfiddle.net/rzjyhf91/" rel="nofollow noreferrer">https://jsfiddle.net/rzjyhf91/</a></p>
  <p>Wherein I have made 2 components: an image and a button.</p>
  <p>The goal is to remove the image with a click of the button, I use <code>unmountComponentAtNode</code> for that, but it does not work:</p>
  <pre><code>var App = React.createClass({
    render: function() {
      return (
      &lt;div&gt;&lt;MyImage /&gt;&lt;RemoveImageButton /&gt;&lt;/div&gt;
      );
    }
  });
  
  var MyImage = React.createClass({
    render: function() {
      return (
        &lt;img id=&quot;kitten&quot; src={'http://placekitten.com/g/200/300'} /&gt;
      );
    }
  });
  
  var RemoveImageButton = React.createClass ({
    render: function() {
      return (
        &lt;button onClick={this.handleClick}&gt;remove image&lt;/button&gt;
      )
    },
    handleClick: function(){
      React.unmountComponentAtNode(document.getElementById('kitten'));   
    }
  });
  
  React.render(&lt;App /&gt;, document.body);
  </code></pre>
  <p>How can I remove a react component from another component?</p>