I want to refactor my following code to display multiple icons, using a loop. I have tried looking for examples but so far I have found map being used on arrays, but I don't have array or any collection.
<View style={{ flexDirection: 'row', alignItems: 'center' }}> <Icon type="FontAwesome" name="star" style={{ fontSize: 30, color: '#f1c40f' }} /> <Icon type="FontAwesome" name="star" style={{ fontSize: 30, color: '#f1c40f' }} /> <Icon type="FontAwesome" name="star" style={{ fontSize: 30, color: '#f1c40f' }} /> <Icon type="FontAwesome" name="star" style={{ fontSize: 30, color: '#f1c40f' }} /> <Icon type="FontAwesome" name="star" style={{ fontSize: 30, color: '#f1c40f' }} /> </View> 
react-native-star-ratingpackage, which handles that for you, also it covers halve stars.