UNPKG

create-nova-expo-template

Version:

A template for creating a new React Native app using Expo and TypeScript, with a focus on performance and best practices.

25 lines (22 loc) 617 B
import { useEffect } from "react"; import { Alert, Linking } from "react-native"; import IMPORTANT_VARS from "@/constants/ImportantVars"; export default function useCheckingForcedStoreUpdate() { const lockUntillUpdateFromStore = () => { Alert.alert( "An update is required!", "Please update to the latest version from store", [ { text: "Go To Store", onPress: () => Linking.openURL(IMPORTANT_VARS.androidStoreLink), }, ] ); }; useEffect(() => { if (IMPORTANT_VARS.forceStoreUpdate) { lockUntillUpdateFromStore(); } }, []); }