How to use react-native-store-review - 10 common examples

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 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))
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 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))
            }
github Flaque / quirk / src / feedback / index.tsx View on Github external
async function shouldShowRatingComponent() {
  // Don't show if we literally can't on this device
  if (Platform.OS === "ios" && !StoreReview.isAvailable) {
    stats.log("Review isn't available");
    return false;
  }

  if (
    Platform.OS === "android" &&
    !(await Linking.canOpenURL(PLAY_STORE_URL))
  ) {
    return false;
  }

  // Don't show if they've rated before
  const hasRatedBefore = await flagstore.get("has-rated", "false");
  if (hasRatedBefore) {
    stats.log("has rated before isn't available");
    return false;
github jlyman / react-native-rating-requestor / index.js View on Github external
onPress: () => {
          RatingsData.recordRated();
          callback(true, "accept");
          // This API is only available on iOS 10.3 or later
					if (Platform.OS === 'ios' && StoreReview.isAvailable) {
						StoreReview.requestReview();
					} else {
						Linking.openURL(this.storeUrl);
					}
        },
        style: "default",
github Flaque / quirk / src / lock / LockScreen.tsx View on Github external
code: prevState.code + key,
      };
    });

    if (this.state.code.length !== 4) {
      return;
    }

    if (this.state.isSettingCode) {
      userSetPincode();
      await setPincode(this.state.code);
      haptic.notification(Haptic.NotificationFeedbackType.Success);
      this.props.navigation.navigate(MAIN_SCREEN);

      // After they set a pincode, mayyyybe they like the app enough to give it a review?
      if (Platform.OS === "ios" && StoreReview.isAvailable) {
        userPromptedForReviewWhenSettingCode();
        StoreReview.requestReview();
      }
    }

    const isGood = await isCorrectPincode(this.state.code);
    if (isGood) {
      haptic.notification(Haptic.NotificationFeedbackType.Success);
      this.props.navigation.navigate(MAIN_SCREEN);
      this.setState({
        code: "",
      });
    } else {
      this.setState({
        code: "",
      });
github rainbow-me / rainbow / src / components / settings-menu / SettingsSection.js View on Github external
onPressReview: ({ onCloseModal }) => async () => {
      const maxRequestCount = 2;
      const count = await getAppStoreReviewCount();
      const shouldDeeplinkToAppStore =
        count >= maxRequestCount || !StoreReview.isAvailable;

      if (shouldDeeplinkToAppStore && !DeviceInfo.isEmulator()) {
        Linking.openURL(SettingsExternalURLs.review);
      } else {
        onCloseModal();
        InteractionManager.runAfterInteractions(StoreReview.requestReview);
      }

      return saveAppStoreReviewCount(count + 1);
    },
    onPressTwitter: () => async () => {
github Illu / moonwalk / src / Components / SettingsScreen / SettingsScreen.js View on Github external
onPress={() => {
                if (StoreReview.isAvailable) {
                  StoreReview.requestReview();
                } else {
                  Linking.openURL(
                    "https://itunes.apple.com/us/app/moonwalk-rocket-launches/id1439376174"
                  );
                }
              }}
            >

react-native-store-review

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

MIT
Latest version published 6 months ago

Package Health Score

64 / 100
Full package analysis