Open yaryarma opened 1 year ago
Error message
code
import React from 'react' import { ScrollView, RefreshControl, useWindowDimensions } from 'react-native' import { Tabs, CollapsibleProps, CollapsibleRef, } from 'react-native-collapsible-tab-view' import Contacts from './Contacts' import { HEADER_HEIGHT } from './Header' import { useRefresh } from './useRefresh' type Props = Partial<CollapsibleProps> const ExampleComponent = React.forwardRef<CollapsibleRef, Props>((props, ref) => { const windowHeight = useWindowDimensions().height const [isRefreshing, startRefreshing] = useRefresh() return ( <ScrollView nestedScrollEnabled contentContainerStyle={{ height: windowHeight }} refreshControl={ <RefreshControl refreshing={isRefreshing} onRefresh={startRefreshing} /> } > <Tabs.Container ref={ref} headerHeight={HEADER_HEIGHT} {...props}> <Tabs.Tab name="contact0" label="Tab 0"> <Contacts nestedScrollEnabled /> </Tabs.Tab> <Tabs.Tab name="contact1" label="Tab 1"> <Contacts nestedScrollEnabled /> </Tabs.Tab> </Tabs.Container> </ScrollView> ) }) export default ExampleComponent
const Contacts: React.FC<{ emptyContacts?: boolean nestedScrollEnabled?: boolean }> = ({ emptyContacts, nestedScrollEnabled }) => { const [isRefreshing, startRefreshing] = useRefresh() return ( <Tabs.FlatList data={emptyContacts ? [] : CONTACTS} keyExtractor={(_, i) => String(i)} renderItem={renderItem} ItemSeparatorComponent={ItemSeparator} ListEmptyComponent={ListEmptyComponent} // see https://github.com/software-mansion/react-native-reanimated/issues/1703 onRefresh={Platform.OS === 'ios' ? startRefreshing : undefined} refreshing={Platform.OS === 'ios' ? isRefreshing : undefined} nestedScrollEnabled={nestedScrollEnabled} /> ) }
It is working fine but I am getting an error, How to fix this error
same +1
A bit late, but I'm seeing the same thing. What are the performance implications here? Is it safe to ignore the error?
Error message
code
It is working fine but I am getting an error, How to fix this error