您正在
.map操作中间渲染按钮:
this.props.dealerData.dealersData.map(function(dealer) {它使用不同的值
this; 因此,
this.props在函数内部不存在。我希望能
cannot read property dealerData ofundefined在浏览器控制台中看到。
您需要使用可选
thisArg参数:
this.props.dealerData.dealersData.map(function(dealer) { // ...}, this);将映射功能
this手动绑定:
this.props.dealerData.dealersData.map(function(dealer) { // ...}.bind(this));或使用箭头功能(因为您正在使用ES6功能):
this.props.dealerData.dealersData.map((dealer) => { // ...});


