Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

261
Visualizações
how to create a button, pressable or a touchable opacity that redirects us to a website using react native

hey everyone I am newbie at react native and i want to know how to create a button, touchableopacity or a pressable that redirects us to a website using react native

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Simply, there ir a module from React Native called Linking Doc where you can use the function openURL where the input argument is just your website link.

Full example:

// Import
import { Linking, Text, TouchableOpacity } from 'react-native'


// Component's code
<TouchableOpacity
 style={{
  width: 100,
  height: 60,
  backgroundColor: "red"
 }}
 onPress={() => Linking.openURL("https://stackoverflow.com")}
>
  <Text>
   Go to my website
  </Text>
</TouchableOpacity>

This function redirect to the default external browser of the device. If you want to use the native WebView check this library WebView (which few versions ago was included on react-native library)

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda