Skip to content

Benhurqs/CustomListView-React-Native

Repository files navigation

CustomListView-React-Native

Creating a simple custom ListView with React Native

Alt text

Components

CustomListview

const CustomListview = ({ itemList }) => (
    <View style={styles.container}>
        <FlatList
                data={itemList}
                renderItem={({ item }) => <CustomRow
                    title={item.title}
                    description={item.description}
                    image_url={item.image_url}
                />}
            />

    </View>
);

CustomRow

const CustomRow = ({ title, description, image_url }) => (
    <View style={styles.container}>
        <Image source={{ uri: image_url }} style={styles.photo} />
        <View style={styles.container_text}>
            <Text style={styles.title}>
                {title}
            </Text>
            <Text style={styles.description}>
                {description}
            </Text>
        </View>

    </View>
);

About

Creating a custom ListView with React Native

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published