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

248
Views
React native - Function call doesn't do anything

Very new to react native and javascript... I am trying to call a function and it doesn't seem to do anything.

Here is the fragment of code where the function is called:

<View style={styles.rows}>
   <renderButtons/>  //the function I want to call
   <TouchableOpacity style={styles.interest_button} onPress={SettingsHandler}>
      <Text>{"  testdumdum  "}</Text>
   </TouchableOpacity>   //test to ensure nothing is wrong w function itself
</View>

and there is the function I want to call:

const renderButtons = () => {
   return (
      <TouchableOpacity style={styles.interest_button} onPress={SettingsHandler}>
         <Text>{"  testsmartsmart  "}</Text>
      </TouchableOpacity>
   );
}

Only the container "testdumdum" appears, and I don't know why since the function does basically the same thing for now.

What should I do to fix this?

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

0

You need to start your component with a capital letter:

Note: Always start component names with a capital letter.

docs

so change renderButtons to RenderButtons

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!