Preview websites anyway you want using https://apileap.com/
<ContentPreview
url='http://www.twitch.tv'
useCached={ true }
linkTo={(props) => (
<a
onMouseEnter={() => props.getPreview()}
onMouseLeave={() => props.cleanPreview()}
href={props.url}>
preview
</a>
)}
loader={(props) => (
<div>loading...</div>
)}
previewContainer={(props) => (
<div className='preview-container'>
<img src={props.previewImg} className='preview-container__img' />
</div>
)}
/>
npm run dev
Then access your localhost on port 9000 http://localhost:9000
A string with the site URL to preview
A render prop function with getPreview() and cleanPreview() functions
A render prop function with the generated printscreen image available on previewImg property
A render prop function triggered when is loading
A optional proxy URL to prevent CORS errors. The default value is https://cors-anywhere.herokuapp.com/
A error message in case of failure on fetch