Error: Objects are not valid as a React child (found: object with keys {_U, _V, _W, _X}). If you meant to render a collection of children, use an array instead. code example
Example 1: Objects are not valid as a React child
<SomeComponent>
{ property1: 'someText', property2: 69 }
</SomeComponent>
<SomeComponent>
<AnotherComponent />
<p>Hello, World</p>
</SomeComponent>
<SomeComponent>
const someObject = { property1: 'someText', property2: 69 };
someObject.map(function(item, i) => <li key={i}>{item}</li>)
</SomeComponent>
Example 2: Error: Objects are not valid as a React child (found: object with keys {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}). If you meant to render a collection of children, use an array instead.
Count will we my number of list componets
const {Count} = props;
let list = Count=== undefined?10:Count;
let jsx = [];
for (let index = 0; index < list; index++) {
jsx.push('index'+index)
}
return (
<View>
<Text>{jsx.length}</Text>
{jsx.map((index)=>(
<Text>{index}<Text>))
}
</View>
)
=============================
must warp loop under parent View
Example 3: objects are not valid as a react child
const App = async () => {
const auth = await somePromise();
return (
<></>
);
}