Skip to content

DynamicLink is a lightweight, Firebase-free alternative for handling dynamic links and deep links in web and mobile hybrid environments

License

Notifications You must be signed in to change notification settings

tinyhref/dynamic-link

Repository files navigation

DynamicLink

Installation

npm install @tinyhref/dynamic-link
or
yarn add @tinyhref/dynamic-link

Use It

import React from 'react';
import DynamicLink from '@tinyhref/dynamic-link';

const dynamicLinkProps = {
  subdomainUrl: 'https://deeplink.tinyhref.com',
  appStoreUrl: 'https://apps.apple.com/app/apple-store/id1072038396',
  googlePlayUrl: 'https://play.google.com/store/apps/details?id=vn.vtv.vtvgo',
  fallbackUrl: 'https://tinyhref.com',
  onOpenStore: ({ link }) => {
    // Handle Clipboard-Based Deferred Deep Linking
  }
};

<DynamicLink
  {...dynamicLinkProps}
>
  Open App
</DynamicLink>

or

import React from 'react';
import { useOpenDynamicLink } from '@tinyhref/dynamic-link';

const { link } = useOpenDynamicLink({
  subdomainUrl: 'https://deeplink.tinyhref.com',
  appStoreUrl: 'https://apps.apple.com/app/apple-store/id1072038396',
  googlePlayUrl: 'https://play.google.com/store/apps/details?id=vn.vtv.vtvgo',
  fallbackUrl: 'https://tinyhref.com'
});

<a href={link}>
  Open App
</a>

About

DynamicLink is a lightweight, Firebase-free alternative for handling dynamic links and deep links in web and mobile hybrid environments

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published