Skip to content

Commit 6a6fb51

Browse files
committed
Fix missing apostrophe from the example
1 parent a80f36c commit 6a6fb51

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Readme.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,18 +256,17 @@ As soon as at least 1px of the child element is visible in the parent document v
256256
```jsx
257257
import React from 'react'
258258
import ReactDOM from 'react-dom'
259-
import useIsInViewport from 'use-is-in-viewport
259+
import useIsInViewport from 'use-is-in-viewport'
260260

261261
export default function SimpleElement() {
262262
const [isInViewport, childElToWatch] = useIsInViewport()
263263

264264
return (
265-
<div ref={childElToWatch}>
266-
<p>{isInViewport ? 'In viewport' : 'Out of viewport'}</p>
267-
</div>
265+
<div ref={childElToWatch}>
266+
<p>{isInViewport ? 'In viewport' : 'Out of viewport'}</p>
267+
</div>
268268
)
269269
}
270-
271270
```
272271

273272
More examples coming soon...

0 commit comments

Comments
 (0)