@platformbuilders/use-rating
TypeScript icon, indicating that this package has built-in type declarations

0.3.10-beta.1 • Public • Published

Build Status codecov npm MIT

@platformbuilders/use-rating

Easily check if user should be asked about rating based on number of uses and last rated version.

Install

yarn add react-native-store-review @platformbuilders/use-rating

Usage

iOS users will be inapp prompted to rate (1 to 5 stars) your app. Android users will be redirected to app's page on Play Store.

import { useRating } from '@platformbuilders/use-rating';

const { shouldRate, askRate } = useRating(DeviceInfo.getVersion());

const checkRating = async () => {
  const minUsageNumber = 3;
  const shouldAsk = await shouldRate(minUsageNumber);
  if (shouldAsk) {
    askRate(DeviceInfo.getBundleId());
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @platformbuilders/use-rating

Weekly Downloads

2

Version

0.3.10-beta.1

License

MIT

Unpacked Size

65.7 kB

Total Files

41

Last publish

Collaborators

  • luancteixeira
  • dev-builders