Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native 为什么本地平面列表为空?_React Native - Fatal编程技术网

React native 为什么本地平面列表为空?

React native 为什么本地平面列表为空?,react-native,React Native,我用母语。我需要在平面列表中渲染很多图像。我用 return ( <View style={styles.main}> {!fetchingImages ? ( <FlatList containerContentStyle={[{alignSelf: 'stretch'}]} data={images}

我用母语。我需要在平面列表中渲染很多图像。我用

return (
        <View style={styles.main}>
            {!fetchingImages ? (
                <FlatList
                    containerContentStyle={[{alignSelf: 'stretch'}]}
                    data={images}
                    renderItem={({item}) => (
                        <ImageCard item={item}/>
                    )}
                    keyExtractor={item => generateKey(item.id)}

                    // Performance settings
                    removeClippedSubviews={true} // Unmount components when outside of window

                />
            ) : (
                <ActivityIndicator size="large" color="#0000ff"/>
            )}
        </View>
    );

返回(
{!获取图像(
(
)}
keyExtractor={item=>generateKey(item.id)}
//性能设置
removeClippedSubviews={true}//在窗口外卸载组件
/>
) : (
)}
);
然后屏幕加载为空,但如果我开始滚动,平面列表开始显示。
我哪里有错?

请同时分享ImageCard代码。平面列表中的ImageCardAdd
extraData={this.state}
props中存在问题。