We are having what we believe to be an async issue with getting residents data in Card.js. On line 7, we see many console logs WITH data, then many console logs saying mappedResidents is undefined. We also think we might be overwriting state at some point.
1// const residentValues = Object.values(residents);
2//
3// const mappedResidents = residentValues.map((resident, i) => {
4// return resident.name;
5// });
6// console.log(model, passengers, vehicleName, vehicleClass);
7// console.log('MAP IN MAP:', mappedResidents);
We are having what we believe to be an async issue with getting residents data in Card.js. On line 7, we see many console logs WITH data, then many console logs saying mappedResidents is undefined. We also think we might be overwriting state at some point.
1// const residentValues = Object.values(residents);
2//
3// const mappedResidents = residentValues.map((resident, i) => {
4// return resident.name;
5// });
6// console.log(model, passengers, vehicleName, vehicleClass);
7// console.log('MAP IN MAP:', mappedResidents);