I am setting up a React app with a Rails backend. I am getting the error \"Objects are not valid as a React child (found: object with keys {id, name, info, created_at, updat
In JavaScript, arrays and collections are different, although they are somewhat similar, but here the react needs an array.
You need to create an array from the collection and apply it.
let homeArray = new Array(homes.length);
let i = 0
for (var key in homes) {
homeArray[i] = homes[key];
i = i + 1;
}