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

91
Views
¿Hay alguna forma de usar accesorios de navegación de reacción como un objeto definido en un componente reutilizable?

Empecé a usar rn esta semana para hacer una aplicación de escala media para una escuela de tutoría. Y encontré algún problema con la navegación con accesorios definidos.

Como verá, defino el nombre de pantalla de la pila con 'test1', 'test2' en root app.js igual que la variable de dirección.

el problema es que cuando uso 'test1' en lugar de {address} funciona bien, pero cuando uso {address}, me grita, incluso cuando consuelo sigue siendo 'test1'.

Aquí está mi código:

 .... .... <Stack.Screen name="test1" component={GrLesson1} /> <Stack.Screen name="test2" component={GrLesson2} />
 function GrHome({navigation}) { return ( <View> <GrHomeProps title="test1" address="test1" navigation={navigation}/> <GrHomeProps title="test2" address="test2" navigation={navigation}/> </View> ) }
 function GrHomeProps({title,navigation,address}) { return ( <View> <TouchableOpacity onPress={()=>{ navigation.navigate({address}) }} > <Text> {title} </Text> </TouchableOpacity> </View> ) }
 Can somebody help me? find the mistake i made or teach me another way to do this with reusable component?
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

sin corchetes

 navigation.navigate(address)
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!