-
Notifications
You must be signed in to change notification settings - Fork 4
/
PreCacheImgDemo.jsx
19 lines (16 loc) · 952 Bytes
/
PreCacheImgDemo.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import React, { Component } from 'react';
import { render } from 'react-dom';
import PreCacheImg from './react-precache-img';
class PreCacheImgDemo extends Component {
render() {
return (
<div>
<h1>PreCacheImg Component Demo</h1>
<span>In Chrome, copy and paste this in a new tab to view your cache: <code>chrome:https://cache/</code></span>
<p>You should see <code>http:https://searchengineland.com/figz/wp-content/seloads/2015/12/google-amp-fast-speed-travel-ss-1920.jpg</code> and <code>https://upload.wikimedia.org/wikipedia/commons/6/62/Starsinthesky.jpg</code> at the top of the list</p>
<PreCacheImg images={['http:https://searchengineland.com/figz/wp-content/seloads/2015/12/google-amp-fast-speed-travel-ss-1920.jpg', 'https://upload.wikimedia.org/wikipedia/commons/6/62/Starsinthesky.jpg']} />
</div>
);
}
}
render(<PreCacheImgDemo />, document.getElementById('root')); // eslint-disable-line no-undef