Home > Net >  how can i retrieve an url from firebase and show it as clickable link in react native?
how can i retrieve an url from firebase and show it as clickable link in react native?

Time:10-13

<Text> {website link}</Text> it appeared as a text and now I want it to be a clickable link, so how can use the OpenURL and send a firestore field in its parameter?

CodePudding user response:

import { Linking } from 'react-native';

// define websiteLink variable somewhere 

....

<Text 
      onPress={() => Linking.openURL(websiteLink)}>
  {websiteLink}
</Text>
  • Related