Skip to content

Commit 08e389d

Browse files
authored
Update Recipes.md
1 parent fabda42 commit 08e389d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/Recipes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ Triggering animations once they enter the viewport is also a perfect use case
8181
for an IntersectionObserver.
8282

8383
- Set `triggerOnce`, to only trigger the animation the first time.
84-
- Set `threshold`, to control how much of the element should visible before
84+
- Set `threshold`, to control how much of the element should be visible before
8585
firing the event.
8686
- Instead of `threshold`, you can use `rootMargin` to have a fixed amount be
87-
visible before triggering. Use a negative margin value, like `-100px 0`, to
87+
visible before triggering. Use a negative margin value, like `-100px 0px`, to
8888
have it go inwards. You can also use a percentage value, instead of pixels.
8989

9090
```jsx
@@ -94,7 +94,7 @@ import { useSpring, animated } from 'react-spring'
9494

9595
const LazyAnimation = () => {
9696
const [ref, inView] = useInView({
97-
rootMargin: '-100px 0',
97+
rootMargin: '-100px 0px',
9898
})
9999
const props = useSpring({ opacity: inView ? 1 : 0 })
100100

0 commit comments

Comments
 (0)