1.0.0 • Published 4 years ago

react-native-store-rating-prompt v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

React Native Store Rating Prompt

Stores Supported:

Apple App StoreGoogle Play

Getting started

$ npm install react-native-store-rating-prompt

Usage

Users are presented with a modal allowing them to choose amount of stars which is defined with totalStarCount prop.

The star rate taken from the users is compared to the value defined in storeRedirectThreshold. If this value is greater than the value of storeRedirectThreshold, the user is directed to the App store or Google Play Store. If it is equal and smaller, comment popup will be opened and users will be allowed to type a comment.

Props

PropertiesRequiredTypeDescriptionDefault
playStoreURLyesstringGoogle Play Store App URL market://details?id=${APP_PACKAGE_NAME}
iTunesStoreURLyesstringApple ITunes App URL itms-apps://itunes.apple.com/app/${APP_ID}
sendContactUsFormyesfunctionFunction fired when send bottom clickArgument: { isModalOpen: true, rating: 3, review: "Lorem ipsum dolor sit amet...", reviewError:false, showContactForm:true }
onSendReviewnofunctionFunction called when the user it sent for review
modalTitlenostringThe modal header title"How many stars do you give to this app?"
rateButtonTextnostringThe button text."Rate"
cancelButtonTextnostringThe cancel button text."Cancel"
totalStarCountnonumberThe starts count on modal.5
defaultRatingnonumberDefault Rating5
isVisiblenobooleanShows rating on modal.true
sendButtonTextnostringThe text of send button."Send"
commentPlaceholderTextnostringUser review modal placeholder text."You can write your comments here"
isTransparentnobooleanBackground styletrue
starLabelsnoarrayThe array of rating title.['Terrible', 'Bad', 'Okay', 'Good', 'Great']
emptyCommentErrorMessagenostringUser review comment box validation text"Please specify your opinion."
isModalOpennobooleanControl if the modal open or not.false
storeRedirectThresholdnonumberMinimum rating threshold for redirect3
stylenoobjectAdditional Modal Styles.
onStarSelectednofunctionFunction fired when the rating has changed.return: number
onClosednofunctionFunction fired when the modal has closed.console.warn('pressed cancel button...')

Notes

This is a more up-to-date fork of react-native-store-rating.