title: changing prototype of required React component
body: <pre><code>var Foo = require('Foo');
  Foo.prototye.componentDidMount = () =&gt; {};
  </code></pre>
  
  <p>I import Foo, but for the case that I use it, I want to override the componentDidMount function on it's prototype. I know this is a hack : (</p>
  
  <p>If I do this, I worry that in other cases where Foo is used, it's prototype will also be changed.</p>
  
  <p>Is there a way to essentially "scope" changing the prototype to within this file?</p>