title: How to cache / save images in react and display them?
body: <p>I have a list of URLs to images. Each of these images sometimes load and sometimes 404 (meaning that an image that loaded at some point may disappear later).</p>
  
  <pre><code>let images = ['http://example.com/img1.jpg', ...];
  </code></pre>
  
  <p>Is there a way to request these images, to save them in memory if the request is successful, and to display those saved images in React?</p>
  
  <pre><code>componentDidMount() {
    this.setState({ savedImages: images.map(saveImage)} );
  }
  
  render() {
    return (
      &lt;div&gt;&lt;image src={this.state.savedImages[0]}/&gt;&lt;/div&gt;
    );
  }
  </code></pre>