Replies: 1 comment 1 reply
-
|
The answer is that it’s meant to be used for renders as equally as triggering animations. There’s already the inView() function in the base library that you could use in an effect if you want to avoid re-renders entirely |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Maybe it’s a stupid question, but im interested. Why does useInView use a state if i want to use it in conjunction with the animate function. Because of this, the component is re-renders. Is it necessary? I mean you can animate without re-render component, so why would a library use a hook that has state
Beta Was this translation helpful? Give feedback.
All reactions