'React Native send email with link to web app or mobile app

I am trying to implement deep linking into this app. The app is a React Native Expo app, and is served on web, iOS and Android. There are a bunch of things we want to achieve with this i.e. link to specific things in the app such as certain messages etc. But currently my primary focus is just to navigate to general screens like 'Home', 'Messages', 'Login' etc.

I have been testing and so far, I can enter the URIs such as exp://host:port/--/login and they work as expected.

However, I know and understand that this will not work in a web browser on my laptop for example.

So my question is, how do I send an email to a user let's say after they have verified their account, prompting them to login, with a link that will for one, take them to the web app if they are on desktop, and two open the mobile app if they have it installed on their phone?

And just as an example, let's imagine my deep link URI is myapp://login

Thanks for any help.

EDIT

After looking around some more, I am deciding to consider the possibility of linking to the web app, and upon the web app loading, linking to the mobile app if they have it installed.

Given this, what is the best way to handle this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source