Components file:
function GoalItem(props) {
return(
<Text style={Styles.prop}>{props.text}</Text>
);
}
export default GoalItem;
App file:
<FlatList data={(list)} renderItem={(itemData) => {
<GoalItem text={(itemData.item.value)} />
}}
keyExtractor={(item, index) => {
return item.id
}}/>
Your
renderItem
function has no return statement. Try this: