Closed
Description
React 16.0.0 with SSR & lazysizes 4.0.1.
Trying to use the "the noscript pattern" to lazy load images with lazysizes but I'm seeing this:
Warning: Expected server HTML to contain a matching <img> in <noscript>.
Image component render method:
render () {
const { cdn, url, width, height } = this.props
if (!url) return null
const noScriptImgProps = {
src: `${cdn}${url}`,
className: classNames('product-image'),
width,
height
}
const imgProps = {
'data-src': `${cdn}${url}`,
className: classNames('product-image', 'lazyload'),
width,
height
}
return (
<span>
<noscript>
<img {...noScriptImgProps} />
</noscript>
<img {...imgProps} />
</span>
)
}
Does React have an issue with noscript
tags..?