Deep linking in react native with expo

Viewed 806

I'm trying to figure out how to get started with Linking provided by expo. I've read the documentation 100 times and I'm still failing to make it work. When the code below runs I'm getting this as the URL:

created url: exp://192.168.11.2:19000 fine.

created url 2 : exp://192.168.11.2:19000/--/screens/Chatbot.js hello=world&goodbye=now

What is -- ??

How do i specify the path within my project to a certain component so that it can find it? All tips are appreciated. Please don't link me to the documentation I've already read react natives docs and expos docs on deep linking.

componentDidMount() {
    Linking.addEventListener('url', this.handleDeepLink);

    let baseUrl = Expo.Linking.makeUrl();
    console.log('created url: ' + baseUrl);

    let chatbotUrl = Expo.Linking.makeUrl('screens/Chatbot.js', { hello: 
       'world', goodbye: 'now' });
    console.log('created url 2 : ' +chatbotUrl);

    setTimeout(() => Linking.openURL(chatbotUrl), 2000);
}
0 Answers
Related