Open AugustoAleGon opened 10 months ago
the onScroll method does not work either on the Tabs.Flatlist
the onScroll method does not work either on the Tabs.Flatlist
I found that it doesn't work either, but you can do something like this with the Tabs.Flatlist
being in a separate component
const scrollHandler = useCallback(
(value: number) => {
/* Handle however */
},
[],
);
const scrollY = useCurrentTabScrollY();
// From react-native-reanimated
useAnimatedReaction(
() => scrollY.value,
(y) => {
runOnJS(scrollHandler)(y);
},
[scrollHandler],
);
I am facing an issue when I try to get the
useCurrentTabScrollY
value and share to its parent. I already check the Animated Header on the examples, since the main issue is thatSharedValue
actually can't be access from its parent to make some modification on the header.I am trying to pass as a value but from the parent I don't get any updates.