How to use the react-native-store-review.requestReview function in react-native-store-review

To help you get started, we’ve selected a few react-native-store-review examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github egm0121 / splitcloud-app / redux / middleware / storeReviewRequestor.js View on Github external
return action => {      
      const state = store.getState().reviewState;
      let result = null;
      if( actionTypeWhitelist.indexOf(action.type) > -1 ){
        // This API is only available on iOS 10.3 or later
        if ( state.actionCounter == MAX_REVIEW_POSITIVE_ACTIONS ) {
          console.log('trigger appstore review panel!')
          StoreReview.isAvailable && StoreReview.requestReview();
          store.dispatch(reviewCountDoneAction());
        }
        if ( 
          state.actionCounter === MAX_INTERACTION_COUNT ||
          state.dailyActionCounter === MAX_DAILY_INTERACTION_COUNT
        ) {
          console.log('max songs reached  - block inflight change track action')
        } else {
          result = next(action);
        }
      } else {
        result = next(action);
      }
      return result;
    }
  }
github goldennetwork / golden-wallet-react-native / app / stores / SettingStore.js View on Github external
showPopupRating() {
    if (Platform.OS === 'ios') {
      // This API is only available on iOS 10.3 or later
      if (StoreReview.isAvailable) {
        StoreReview.requestReview()
      }
    } else {
      Alert.alert(
        constant.titleRatingApp,
        constant.desRatingApp,
        [
          { text: constant.ratingLater },
          { text: constant.cancel, onPress: () => { }, style: 'cancel' },
          {
            text: constant.rating,
            onPress: () => {
              Linking.openURL(PLAY_STORE_LINK)
                .catch(err => console.error('An error occurred', err))
            }
          }
        ],
github goldennetwork / golden-wallet-react-native / app / modules / Setting / stores / SettingStore.js View on Github external
showPopupRating() {
    if (Platform.OS === 'ios') {
      // This API is only available on iOS 10.3 or later
      if (StoreReview.isAvailable) {
        StoreReview.requestReview()
      } else {
        NavStore.popupCustom.show('Store review is not available')
      }
    } else {
      Alert.alert(
        constant.titleRatingApp,
        constant.desRatingApp,
        [
          { text: constant.ratingLater },
          { text: constant.cancel, onPress: () => { }, style: 'cancel' },
          {
            text: constant.rating,
            onPress: () => {
              Linking.openURL(PLAY_STORE_LINK)
                .catch(err => console.error('An error occurred', err))
            }

react-native-store-review

Rate on App Store or Google Play directly in your React Native app

MIT
Latest version published 11 months ago

Package Health Score

64 / 100
Full package analysis