a react-native component for display interactive star ratings
npm install react-native-starratingnpm install react-native-starrating --save
Install the package via npm install react-native-starrating --save. Then import it in your JavaScript file via import StarRating from 'react-native-starrating'. Check out an example usage below:
``js
import StarRating from 'react-native-starrating';
class ExampleComponent extends React.Component{
onStarRatingPress(value) {
console.log('Rated ' + value + ' stars!');
}
render() {
return (
rating={3}
disabled={false}
starSize={15}
onStarChange={(value) => this.onStarRatingPress(value)}
/>
);
}
}
``