diff options
author | dan <dan.abramov@gmail.com> | 2023-11-10 19:00:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-10 19:00:46 +0000 |
commit | 65def371659c3b64481199b2585a40a1affd9ec2 (patch) | |
tree | 1fb92b4717fcfc82bdd476fdbcaa4ea80cb673bb /src/lib/hooks/useAnimatedScrollHandler_FIXED.ts | |
parent | e0e5bc8fd850942b6749ad48d9ae087d99026996 (diff) | |
download | voidsky-65def371659c3b64481199b2585a40a1affd9ec2.tar.zst |
Push useAnimatedScrollHandler down everywhere to work around bugs (#1866)
* Move useOnMainScroll handlers to leaves * Force Feed to always take handlers * Pass handlers from the pager
Diffstat (limited to 'src/lib/hooks/useAnimatedScrollHandler_FIXED.ts')
-rw-r--r-- | src/lib/hooks/useAnimatedScrollHandler_FIXED.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/hooks/useAnimatedScrollHandler_FIXED.ts b/src/lib/hooks/useAnimatedScrollHandler_FIXED.ts index eccfabbb0..56a1e8b11 100644 --- a/src/lib/hooks/useAnimatedScrollHandler_FIXED.ts +++ b/src/lib/hooks/useAnimatedScrollHandler_FIXED.ts @@ -1 +1,15 @@ +// Be warned. This Hook is very buggy unless used in a very constrained way. +// To use it safely: +// +// - DO NOT pass its return value as a prop to any user-defined component. +// - DO NOT pass its return value to more than a single component. +// +// In other words, the only safe way to use it is next to the leaf Reanimated View. +// +// Relevant bug reports: +// - https://github.com/software-mansion/react-native-reanimated/issues/5345 +// - https://github.com/software-mansion/react-native-reanimated/issues/5360 +// - https://github.com/software-mansion/react-native-reanimated/issues/5364 +// +// It's great when it works though. export {useAnimatedScrollHandler} from 'react-native-reanimated' |