Skip to content

Commit 31a890b

Browse files
iggherathebuilder
authored andcommitted
Fix recipe for triggering animations (#271)
1 parent 64313b5 commit 31a890b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/Recipes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ import { useInView } from 'react-intersection-observer'
9393
import { useSpring, animated } from 'react-spring'
9494

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

0 commit comments

Comments
 (0)