customInnerItem: _SubCategory(),
function _SubCategory() {
return (
<View style={{ flex: 1, backgroundColor: "yellow", height: 500 }}>
<FlatGrid
itemDimension={50}
data={items}
style={styles.gridView}
// staticDimension={300}
// fixed
spacing={10}
renderItem={({ item }) => (
<View
style={[styles.itemContainer, { backgroundColor: item.code }]}
>
<Text style={styles.itemName}>{item.name}</Text>
<Text style={styles.itemCode}>{item.code}</Text>
</View>
)}
/>
</View>
);
}
If I render this method directly it works but if I render it inside a subcategory it just shows blank screen