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

115
Visualizações
How can we use style prop in TouchableWithoutFeedback or TouchableWithNativeFeedback?

I want to give some style to the TouchableWithNativeFeedback , The style prop doesnot work although it works fine with the TouchableOpacity but it wont work with the native feedback. Is there any way we can make it work. I found a solution but I dont want to do it is there any other way.

The solution that I found in github.

link :

https://github.com/facebook/react-native/issues/8307

Answer:

I was having the same issue. But I wrapped the TouchableWithoutFeedback element with a view and styled the view instead. And I wrapped everything inside the TouchableWithoutFeedback with another view with a style identical to the parent view. This seems to have fixed it for me.

Thank you.

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

0

This is not possible, since TouchableWithNativeFeedback does not have a style prop. This is documented here in the documentation.

The recommended pattern is the one you do not want to use (for whatever reason).

// the styling in the view of the child of TouchableWithoutFeedback
<TouchableWithoutFeedback onPress={onPress}>
   <View style={styles.button}>
     <Text>Touch</Text>
   </View>
</TouchableWithoutFeedback>
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