PedroBern / react-native-collapsible-tab-view

A cross-platform Collapsible Tab View component for React Native
MIT License
830 stars 161 forks source link

Tab.Flatlist not working #206

Closed sushantWemotive closed 2 years ago

sushantWemotive commented 2 years ago

import React from 'react'; import {StyleSheet, View} from 'react-native'; import {Tabs} from 'react-native-collapsible-tab-view'; import {useTheme} from 'react-native-elements'; import PostCard from '../post/components/PostCard'; import UserProfileDetails from './UserProfileDetails'; import UserProfileHeader from './UserProfileHeader';

const CollapsibleTabView = ({data, navigation, userData}) => { const {theme} = useTheme(); const Header = () => { return ( <View style={[ styles.headerStyle, {backgroundColor: theme.colors.postCardBackground}, ]}>

    <UserProfileDetails data={userData} navigation={navigation} />
  </View>
);

};

const renderItem = ({item}) => { return ( <View style={[ styles.cardStyle, {backgroundColor: theme.colors.postCardBackground}, ]}>

  </View>
);

};

return (

index.toString()} /> index.toString()} /> index.toString()} />

); }; const styles = StyleSheet.create({ cardStyle: { marginBottom: 16, padding: 16, }, }); export default CollapsibleTabView;

andreialecu commented 2 years ago

For usage examples take a look at the example app in this repository.