title: React img onError event not triggered
body: <p>In my create-react-app I have cards that display server-side images and I want to use a dummy image when no server-side image is returned. It seems that 'onError' event is never triggered. Here is my code:</p>
  
  <pre><code>import React from 'react';
  import notfound from '../../icons/notfound.png';
  
  class Card extends React.Component {
  constructor(props) {
      super(props);
      this.state = {
          open: false
      }
  }
  
  addDefaultSrc(ev){
      ev.target.src = {notfound};
      ev.target.onerror = null;
  }
  
  render(){
      return (
          &lt;div&gt;
             &lt;div&gt;&lt;img className="item-photo" onError={() =&gt; this.addDefaultSrc} src={url} alt=""&gt;&lt;/img&gt;
             &lt;/div&gt;
          &lt;/div&gt;
      );
  }
  </code></pre>
  
  <p>and CardsList</p>
  
  <pre><code>    return (
           &lt;Card
               key={i}
               id={item.No}
               url={`http://***.***.*.*:3000/${item.No}.JPG`} 
           /&gt;
  </code></pre>
  
  <p>Although I am getting 404 error (Not Found) when there is no image to be displayed, onError event is not triggered. Any help would be much appreciated.</p>