React Native Star Rating Component
import React, { useState } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import RatingModal from 'react-native-rating-modal-box';
const App = () => {
const [isOpenRating, setOpenRating] = useState(true);
return (
<View style={styles.container}>
<RatingModal
iTunesURL="itms-apps://itunes.apple.com/app/11111"
playMarketURL="market://details?id=com.myproject.text"
onClose={() => setOpenRating(false)}
visible={isOpenRating}
ratingConfirm={selectedRating => {
console.log('Selected rating', selectedRating);
}}
/>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: "center",
},
text: {
fontSize: 16
},
wrapperCustom: {
borderRadius: 8,
padding: 6
},
logBox: {
padding: 20,
margin: 10,
borderWidth: StyleSheet.hairlineWidth,
borderColor: '#f0f0f0',
backgroundColor: '#f9f9f9'
}
});
export default App;
Piyush Kamani