Confusion on useScrollViewOffset
in 3.10.1
#6624
Unanswered
thebiltheory
asked this question in
Q&A
Replies: 1 comment
-
Hey! It is just the incorrect type. Remarks from the You can just cast the type for now to satisfy typescript. We will have to fix types in the library in the future and change the hook name to something more meaningful because the current one suggests that it works only with the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using
useScrollViewOffset
on aFlatlist
, I am assuming that a Flatlist is also a scroll type component.However, (according to typescript) it seems that
useScrollViewOffset
is only meant to be used on aScrollView
?Yet, when I use it on a
Flatlist
, it works. Are the typings wrong, or the fact it also works on aFlatlist
coincidental.Beta Was this translation helpful? Give feedback.
All reactions