import React, { useCallback, useState } from "react"; import { StatusBar, Text, View } from "react-native"; import { useSharedValue } from "react-native-reanimated"; import { Route, CollapsibleTabView } from "@showtime-xyz/tab-view"; import { TabFlashList } from "./tab-flash-list/index"; const StatusBarHeight = StatusBar.currentHeight ?? 0; const TabScene = ({ route }: any) => { return ( { return ( {`${route.title}-Item-${index}`} ); }} /> ); }; export function Example() { const [isRefreshing, setIsRefreshing] = useState(false); const [routes] = useState([ { key: "like", title: "Like", index: 0 }, { key: "owner", title: "Owner", index: 1 }, { key: "created", title: "Created", index: 2 }, ]); const [index, setIndex] = useState(0); const animationHeaderPosition = useSharedValue(0); const animationHeaderHeight = useSharedValue(0); const renderScene = useCallback(({ route }: any) => { switch (route.key) { case "like": return ; case "owner": return ; case "created": return ; default: return null; } }, []); const onStartRefresh = async () => { setIsRefreshing(true); setTimeout(() => { console.log("onStartRefresh"); setIsRefreshing(false); }, 300); }; const renderHeader = () => ( ); return ( ); }