-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
Describe the bug
I am trying to render a basic MasonryList
. But not able to generate any output. However it works with vanilla FlatList
.
To Reproduce
Here is the code:
import { StyleSheet, View, FlatList } from "react-native";
import React from "react";
import { SafeAreaView } from "react-native-safe-area-context";
import MasonryList from "@react-native-seoul/masonry-list";
import DashboardCard from "@/components/DashboardCard";
import { widgets } from "@/constants/widgets";
const Dashboard = () => {
return (
<SafeAreaView className="flex">
{/* <FlatList
data={widgets}
keyExtractor={(item) => item.id}
renderItem={(item) => <DashboardCard />}
/> */}
<MasonryList
data={widgets}
keyExtractor={(item) => item.id}
numColumns={2}
showsVerticalScrollIndicator={false}
renderItem={({ item }) => <DashboardCard />}
onEndReachedThreshold={0.1}
/>
</SafeAreaView>
);
};
export default Dashboard;
Smartphone:
- Device: Android
- Version [13]
package version
@react-native-seoul/masonry-list": "^1.4.2
Metadata
Metadata
Assignees
Labels
No labels