I am trying to set the json to a state using user agent, I get the error:
Uncaught Invariant Violation: Objects are not valid as a React child (found:
You can't just return an array of objects because there's nothing telling React how to render that. You'll need to return an array of components or elements like:
render: function() {
return (
// This will go through all the elements in arrayFromJson and
// render each one as a with data from the object
{this.state.arrayFromJson.map(function(object) {
return (
);
})}
);
}