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

0.3.6 • Public • Published

Build Status codecov npm MIT

@buildersbank/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 @buildersbank/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 '@buildersbank/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 @buildersbank/use-rating

Weekly Downloads

1

Version

0.3.6

License

MIT

Unpacked Size

65.2 kB

Total Files

32

Last publish

Collaborators

  • buildersbank