@umituz/react-native-settings 5.3.59 → 5.3.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-settings",
|
|
3
|
-
"version": "5.3.
|
|
4
|
-
"description": "Complete settings hub for React Native apps - consolidated package with settings, localization, about, legal, appearance, feedback, FAQs, rating, and gamification",
|
|
3
|
+
"version": "5.3.60",
|
|
4
|
+
"description": "Complete settings hub for React Native apps - consolidated package with settings, localization, about, legal, appearance, feedback, FAQs, rating, and gamification - expo-store-review now lazy loaded",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"sideEffects": false,
|
|
@@ -117,6 +117,9 @@
|
|
|
117
117
|
"type": "git",
|
|
118
118
|
"url": "https://github.com/umituz/react-native-settings"
|
|
119
119
|
},
|
|
120
|
+
"optionalDependencies": {
|
|
121
|
+
"expo-store-review": "~6.0.0"
|
|
122
|
+
},
|
|
120
123
|
"peerDependencies": {
|
|
121
124
|
"@expo/vector-icons": ">=14.0.0",
|
|
122
125
|
"@react-navigation/native": ">=6.0.0",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* useAppRating Hook
|
|
3
3
|
* React hook for app rating system
|
|
4
|
+
* Lazy loads expo-store-review to reduce bundle size
|
|
4
5
|
*/
|
|
5
6
|
|
|
6
7
|
import React, { useState, useCallback, useMemo } from "react";
|
|
7
|
-
import * as StoreReview from "expo-store-review";
|
|
8
8
|
import type {
|
|
9
9
|
RatingConfig,
|
|
10
10
|
UseAppRatingResult,
|
|
@@ -67,6 +67,8 @@ export function useAppRating(config: RatingConfig): UseAppRatingResult {
|
|
|
67
67
|
await RatingService.markRated();
|
|
68
68
|
|
|
69
69
|
try {
|
|
70
|
+
// Lazy load expo-store-review
|
|
71
|
+
const StoreReview = await import('expo-store-review');
|
|
70
72
|
const isAvailable = await StoreReview.isAvailableAsync();
|
|
71
73
|
|
|
72
74
|
if (isAvailable) {
|