【发布时间】:2018-04-27 10:06:06
【问题描述】:
我有这样的状态:
我想在我的渲染中用 .map() 显示它:
{this.state.markers.map((marker, key) => (
<Marker
key={key}
coordinate={this.state.markers[marker].coordinate}
title={this.state.markers[marker].title}
description={this.state.markers[marker].address}
image={require('../images/community.png')}
/>
))}
但每次测试,我都有这样的回应:
this.state.markers.map is not a function
我该怎么做?
【问题讨论】:
标签: javascript ios react-native