Skip to content

Commit b5961b6

Browse files
committed
Adding demo
1 parent dab008d commit b5961b6

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ That is nice to triggered one time animation !
88
![Minified size](https://img.shields.io/bundlephobia/min/react-viewport-detect)
99
[![GPLv3 License](https://img.shields.io/badge/License-GPL%20v3-yellow.svg)](https://opensource.org/licenses/)
1010

11+
## Demo
12+
13+
[example page](https://alexandrebdry.vercel.app/react-viewport-detect)
1114

1215
## Usage
1316

@@ -81,7 +84,6 @@ const App () => {
8184
## Next steps
8285
8386
- TypeScript Support
84-
- Example page
8587
- Improve the DX
8688
- Unit Testing
8789

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-viewport-detect",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"private": false,
55
"description": "A React hook to detect if an HTML Element has been display in the viewport. This is easy to use. You just have to provide an react ref. By default it freeze the value when the element has been display. That is nice to triggered one time animation !",
66
"main": "dist/index.cjs.js",

src/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const useViewportDetection = (ref, {
44
root : root = null,
55
threshold: threshold = 0,
66
freeze: freeze = true
7-
}) => {
7+
} ) => {
88

99
const [isDetected,setIsDetected] = React.useState(false) ;
1010

0 commit comments

Comments
 (0)