renderRatings ( rating ){ let stars = []; // Loop 5 times for (var i = 1; i <= 5; i++) { // Set the path to filled stars let path = <Icon name="star" style={{fontSize: 10, color: '#eb9534',marginHorizontal:2}}/>; // If ratings is lower, set the path to unfilled stars if (i > rating ) { path = <Icon name="star" style={{fontSize: 10, color: theme.LIGHT_GREY_COLOR, marginHorizontal:2}}/>; } // Push the Image tag in the stars array stars.push(path); } return ( <View style={{flexDirection:"row",marginTop: 5,}}> { stars } </View> ) } render () { ...
A Passionate full stack developer with 7 years of amazing experience in full stack application development and expertise in technologies like React Native, NextJS, ReactJS, Codeigniter, PHP , NodeJs. He has huge craze in learning new things about technologies and constantly shares his knowledge with others.