Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I link with a TouchableOpacity in React Native expo

I’m trying ti link a button to another page and here is my issue: The answer to this question is on expo BUT with the class component. And the answer without expo is with the class or function component. But can someone tell me how to do this in a function?

Here is my code:

            <TouchableOpacity
              style={styles.button2}
              onPress={this._handleOpenWithLinking}
            >
              <Text style={styles.text3}>PLUG & PlAY</Text>
            </TouchableOpacity>
_handleOpenWithLinking = () => {
  Linking.openURL("https://expo.dev");
};
 

Thanks a lot!

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

i created a snack for this : snack

probably you got something wrong in importation

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading