import React, { useEffect } from "react"; import { ScrollViewProps, StyleSheet } from "react-native"; import Animated, { useSharedValue } from "react-native-reanimated"; import { useHeaderTabContext } from "./context"; import { useSharedScrollableRef } from "./hooks"; import type { SceneProps } from "./types"; export function SceneComponent

({ index, onScroll, ContainerView, contentContainerStyle, forwardedRef, style, ...restProps }: SceneProps

) { const { updateSceneInfo } = useHeaderTabContext(); const scollViewRef = useSharedScrollableRef(forwardedRef); const scrollY = useSharedValue(0); useEffect(() => { if (scollViewRef && scollViewRef.current) { updateSceneInfo({ scrollRef: scollViewRef, index, scrollY, }); } }, [scollViewRef, index, scrollY, updateSceneInfo]); return ( ); } const styles = StyleSheet.create({ container: { flex: 1, }, });