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

179
Views
Why do I get this warning and how to fix it "Functions are not valid as a React child..."

Full warning:

Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.

I'm making a simple Quiz App, and in this component I'm rendering TouchableOpacities that on click will navigate you to Test screen

 return (
        <View style={styles.container}>
          {
          isLoading ? 
            (<View style={{display:'flex',flex:1,justifyContent:'center',alignItems:'center'}}>
              <ActivityIndicator size="large" color="#0000ff"/>
            </View>):
            (
              <ScrollView>
                  {data.map(test =>(
                    <HomeTestComponent key={test.id} navig={navigation} name={test.name} tags={test.tags} description={test.description}/>
                  ))}

                  <Footer navig={navigation}/>
              </ScrollView>
            
            )
          }
        </View>
     );
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Somewhere you are returning a function in a render function

It'll look something like this:

const func = () => {}

return (
 () => {}
)

return (
  function() {}
)

return ( func )
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!