--- title: useDeeplink description: >- Retrieves the deeplink URL that launched the Mini, enabling external links to open specific screens with context. Use on mount to route to the correct initial screen based on the returned `path`, `queryParams` or `hash`. Common use: email/notification links opening to specific nested screens. api_name: shop-minis source_url: html: 'https://shopify.dev/docs/api/shop-minis/hooks/navigation/usedeeplink' md: 'https://shopify.dev/docs/api/shop-minis/hooks/navigation/usedeeplink.md' --- # use​Deeplink Retrieves the deeplink URL that launched the Mini, enabling external links to open specific screens with context. Use on mount to route to the correct initial screen based on the returned `path`, `queryParams` or `hash`. Common use: email/notification links opening to specific nested screens. ## use​Deeplink() ### Returns * UseDeeplinkReturnType ### UseDeeplinkReturnType * hash string The hash of the deeplink. * path string The path of the deeplink. * queryParams { \[key: string]: string; } The query parameters of the deeplink. ### UseDeeplinkReturnType * hash The hash of the deeplink. ```ts string ``` * path The path of the deeplink. ```ts string ``` * queryParams The query parameters of the deeplink. ```ts { [key: string]: string; } ``` ```ts interface UseDeeplinkReturnType { /** * The path of the deeplink. */ path?: string /** * The query parameters of the deeplink. */ queryParams?: {[key: string]: string | undefined} /** * The hash of the deeplink. */ hash?: string } ``` Examples ### Examples * #### Example code ##### Default ```tsx import {useDeeplink} from '@shopify/shop-minis-react' export default function MyComponent() { const {path, queryParams, hash} = useDeeplink() console.log({path, queryParams, hash}) } ```