1. constructor(props) {
    2. super(props)
    3. this.state = {
    4. lists: []
    5. }
    6. }
    1. render() {
    2. const ListItem = this.state.lists.map(item => {
    3. return (
    4. <View className="content" key={item._id}>
    5. <View className="title">{item.title}</View>
    6. <image src={item.pic} className="img" />
    7. </View>
    8. )
    9. })
    10. return (
    11. <View className="container">
    12. {ListItem}
    13. </View>
    14. )
    15. }