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

255
Views
No se puede activar la acción al hacer clic - react-native-router-flux

Estoy creando mi aplicación con react-native y también uso react-native-router-flux para el enrutamiento. Tengo este fragmento de código en mi archivo router.js y trato de agregar un botón a la derecha que una vez que se hace clic debería activar la acción sayHello .

 const CoinImg = () => { return ( <View> <Image style={{width:20, height:20}} source={require('./myyImage.png')}/> </View> ); }; <Scene onRight={() => Actions.sayHello()} renderRightButton={() => { return <CoinImg />; }} key="firstComponent" component={FirstComponent} title=" " />

El código anterior puede mostrar correctamente la imagen a la derecha, pero cuando hago clic en esa imagen no sucede nada (la acción sayHello() no se activa). En cambio, si tengo el siguiente código, se activa la acción.

 <Scene onRight={() => Actions.sayHello()} rightTitle="Print Hello" key="SecondComponent" component={SecondComponent} renderTitle={() => { return <CoinImg />; }} />

versiones de dependencias:

 "react": "15.3.2", "react-native": "0.34.1", "react-native-router-flux": "^3.35.0"
over 4 years ago · Santiago Trujillo
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!