# useAppVersionSupport()

The `useAppVersionSupport()` hook reports whether your app's version meets the minimum set for it in the Clerk Dashboard, and updates when that changes. When the version is unsupported, Clerk rejects most of the app's requests until the user updates.

[<ClerkProvider>](https://clerk.com/docs/reference/components/clerk-provider.md) shows an update screen automatically while the version is unsupported. Use this hook when you set `updateRequiredViewEnabled` to `false` on `<ClerkProvider>` to show your own update screen instead. To set a minimum version, see [Require a minimum app version](https://clerk.com/docs/guides/development/minimum-app-version.md).

> Clerk reads your app's version with [`expo-application`](https://docs.expo.dev/versions/latest/sdk/application/). Without it, in Expo Go, and on the web, the hook always reports the app as supported.

## Returns

| Name           | Type           | Description                                                                                                                                                                |
| -------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| currentVersion | string | null | This build's version: its CFBundleShortVersionString on iOS and its versionCode on Android. null when Clerk can't read it, such as in Expo Go or without expo-application. |
| isSupported    | boolean        | Whether this version of the app is supported. When it's false, Clerk rejects most of the app's requests until the user updates.                                            |
| minimumVersion | string | null | The oldest supported version, when a minimum is set for this app.                                                                                                          |
| updateUrl      | string | null | The store page that users open to update the app.                                                                                                                          |

## How to use the `useAppVersionSupport()` hook

The following example shows an update screen while the app's version is unsupported, and the app's content otherwise:

filename: src/components/update-gate.tsx
```tsx
import { useAppVersionSupport } from '@clerk/expo'
import type { ReactNode } from 'react'
import { Button, Linking, Text, View } from 'react-native'

export function UpdateGate({ children }: { children: ReactNode }) {
  const { isSupported, updateUrl } = useAppVersionSupport()

  if (isSupported) {
    return children
  }

  return (
    <View>
      <Text>Update required</Text>
      {updateUrl && <Button title="Update" onPress={() => Linking.openURL(updateUrl)} />}
    </View>
  )
}
```

---

## Sitemap

[Overview of all docs pages](https://clerk.com/docs/llms.txt)
