Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

141
Views
Advertencia: no se puede actualizar un componente desde dentro del cuerpo de la función de un componente diferente. en TouchableOpacity

tengo este error

Advertencia: no se puede actualizar un componente desde dentro del cuerpo de la función de un componente diferente.

Cómo arreglar esto ?

Cuando elimino la opacidad táctil, ya no se muestra

 <View style={styles.SaD}> <TouchableOpacity onPress={(e) = props.locationSetState(1)}> // here <Text style={styles.text1}>Choose your starting point</Text> </TouchableOpacity> <TouchableOpacity onPress={(e) = props.locationSetState(2)}> <Text style={styles.text1}>Choose destination</Text> </TouchableOpacity> </View>

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

los detalles no son suficientes para comprender su problema, pero de acuerdo con lo que entiendo de su código, intente usar ganchos de reacción e intente esto

 function App() { const [state,setState]=React.useState(null); console.log(state); return ( <View style={styles.SaD}> <TouchableOpacity onPress={(e) => setState(1)}> <Text style={styles.text1}>Choose destination</Text> </TouchableOpacity> <TouchableOpacity onPress={(e) => setState(2)}> <Text style={styles.text1}>Choose destination</Text> </TouchableOpacity> </View> ); }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!