Native Base 组件不渲染 json 数组映射功能?

Native Base component does not render json array map function?

我在获取 json 数组时在映射函数中加载本机基础组件。我检查了 json 数组的获取数据。我还通过将数据打印到控制台来检查 map 函数中的数据,它也可以正常工作。但是不知道为什么map函数里面没有渲染原生基础组件?

import React, { Component } from 'react';
import { Card, List, ListItem, Thumbnail, Body,Button, Text } from 'native-base';
import { Image } from 'react-native';

export default class CardSection extends Component {
    render() {
        return (
            <Card>
                <List>
                    <ListItem>
                        <Text>FIrst list item</Text>
                    </ListItem>
                </List>
                <List>
                    {
                        this.props.data.map(albumdata => {
                            <ListItem>
                                <Text></Text>{/* not displaying in the simulator */}
                                <Text>{albumdata.title}</Text>{/* not displaying in the simulator */}
                            </ListItem>
                        })
                    }
                </List>
            </Card>
        );
    }
}

我想我知道问题所在,您没有从地图函数回调中返回任何内容。替换-

albumdata => {
  <ListItem>
   <Text></Text>{/* not displaying in the simulator */}
   <Text>{albumdata.title}</Text>{/* not displaying in the simulator */}
  </ListItem>
}

albumdata => {
  return (
    <ListItem>
     <Text></Text>{/* not displaying in the simulator */}
     <Text>{albumdata.title}</Text>{/* not displaying in the simulator */}
    </ListItem>
  );
}

谢谢,如果这能解决您的问题,请告知。