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

199
Views
How to solve: Objects are not valid as a React child (found: object with keys {_U, _V, _W, _X}?

Im trying to map my state , but it allways returns me this error, someone knows how to solve it ?

 useEffect(() => {
    if (mounted && userForm.length > 0) {
      console.log(userForm, 'campos:', userForm.fields);
      return;
    } else {
      setuserForm(JSON.parse(route.params.paramKey));
      console.log(userForm);
    }
  }, [userForm]);

  return (
    <SafeAreaView style={{flex: 1}}>
      <View style={styles.container}>
        <Text style={styles.textStyle}>COLLECTION :</Text>



        {userForm.length > 0 ? (
          userForm.map((item) => (          
            <Text key={uuid.v4()}>{item.fields}</Text>
          ))
        ) : (
          <Text key={uuid.v4()}> Loading ...</Text>
        )}

      </View>
    </SafeAreaView>
  );
};

what I'm trying to do is render all my fields and then handle the following types.

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

0

If I understand you correctly, you are trying to render item.field as node. However, seems that this is an array, so you need to map it one more time. For example, if it contains strings it might looks like this:

  <Text key={uuid.v4()}>{item.fields?.concat('')}</Text>

In case filds contains objects you have to map it to the new component, like this:

  <Text key={uuid.v4()}>{item.fields?.map((field, i)=> <div key={i}>{field.someProp}</div>}</Text>

In case you don't know what is inside the fields, check the Network tab in the ChromeDeveloperTools (F12) or use JSON.stringify

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!