Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

265
Vistas
Can't trigger action on click - react-native-router-flux

I'm creating my app with react-native and also using react-native-router-flux for routing. I have this piece of code in my router.js file and trying to add a button on the right that once is clicked it should trigger sayHello action.

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=" " 
        />

The above code can correctly show image on the right but when I click that image nothing happens (action sayHello() is not triggered). Instead, If I have the following code the action is triggered.

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

dependencies versions:

"react": "15.3.2",
"react-native": "0.34.1",
"react-native-router-flux": "^3.35.0"
over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda