Bacancy Technology
Bacancy Technology represents the connected world, offering innovative and customer-centric information technology experiences, enabling Enterprises, Associates and the Society to Rise™.
12+
Countries where we have happy customers
1050+
Agile enabled employees
06
World wide offices
12+
Years of Experience
05
Agile Coaches
14
Certified Scrum Masters
1000+
Clients projects
1458
Happy customers
Artificial Intelligence
Machine Learning
Salesforce
Microsoft
SAP
June 21, 2023
Error is thrown when an Object is directly being passed to be rendered as a component child OR props.
React does not support objects being rendered directly.
Normally, to render objects we can access a value by accessing key of object
Example:-
let personObj = {name : “DummyName”}
Try accessing like this
{personObj.name}
Another option is to iterate over object, i.e.
{Object.keys(personObj).map((key) => ( <div key={key}> {key}: {personObj[key]} </div> ))}
This will render the whole object with key-value pair.