next.js
next.js copied to clipboard
Update docs for `next/future/image` migration guide
Follow up to #39270 to make the props collapse to newlines
I'm not sure this would be the issue of how they're displayed on mobile, though. Should we try removing the table instead?
I would suggest doing it like this:
Responsive
// next/image: <ImageLegacy src={src} layout="responsive" />
// next/image/future: Use `sizes` and `style` for the same behavior
<ImageFuture
src={src}
sizes="100vw"
style={{ width: '100%', height: 'auto' }}
/>
@leerob are you suggesting using comments so the legacy code isn’t highlighted?
Correct - my thought is you're going here because you want to copy-paste the new version, so the code comment gives you the only one to reference.
Closing in favor of #39421