Skip to content

Commit

Permalink
Merge branch 'canary' into napi-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Aug 30, 2022
2 parents f85e1ed + b760c8d commit 5da15d3
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions docs/api-reference/next/image.md
Expand Up @@ -279,14 +279,16 @@ The Ref must point to a DOM element or a React component that [forwards the Ref]
import Image from 'next/image'
import React from 'react'

const lazyRoot = React.useRef(null)
const Example = () => {
const lazyRoot = React.useRef(null)

const Example = () => (
<div ref={lazyRoot} style={{ overflowX: 'scroll', width: '500px' }}>
<Image lazyRoot={lazyRoot} src="/one.jpg" width="500" height="500" />
<Image lazyRoot={lazyRoot} src="/two.jpg" width="500" height="500" />
</div>
)
return (
<div ref={lazyRoot} style={{ overflowX: 'scroll', width: '500px' }}>
<Image lazyRoot={lazyRoot} src="/one.jpg" width="500" height="500" />
<Image lazyRoot={lazyRoot} src="/two.jpg" width="500" height="500" />
</div>
)
}
```

**Example pointing to a React component**
Expand Down

0 comments on commit 5da15d3

Please sign in to comment.