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

258
Views
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
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!