使用默认道具呈现FlatList时出错无法在'WorkerGlobalScope'上执行'importScripts'

问题描述:

当我在我的react-native应用中导入和使用flatList时出现此错误。使用默认道具呈现FlatList时出错无法在'WorkerGlobalScope'上执行'importScripts'

import { Text, FlatList } from 'react-native' 

我FlatList组件:

<FlatList 
data={responseData} 
renderItem={({node}) => <Text style={} >{node.nameWithOwner}</Text>}/> 

我不没有从世博模拟器屏幕任何道具 渲染FlatList时得到一个错误。

当只使用数据的道具,而不是renderItem道具我得到renderItem is not a function

img_20171029_083459

abi21_0_0.com.facebook.react.common .JavascriptException: Failed 
to execute 'importScripts' on 'WorkerGlobalScope': The script at 
'http://1 92.1 68.0.1 3:19001/ node_modules/react-native- 
scripts/build/bin/crna-entry.bundle?platform=android&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/ hashAssetFiles' failed to load. 
Failed to execute 'importScripts' on 'WorkerGlobalScope': The script 
at 'http:// 192.168.0.13:19001/node_modules/reactnative- 
scripts/build/bin/crna-entry.bundle?platform=android&dev=true&strict=false&minify=faIse&hot=false&assetPlugin= 
expoltoolsl hashAssetFiles' failed to load. 
loadApplicationScript WebsocketJavaScriptExecutor.java:173 
run NativeRunnable.java 

像这样的东西的Facebook /反应母语#13558这https://github.com/facebook/react-native/issues/6035https://github.com/bnovf/react-native-github-graphql-app/issues/3

这是FlatList本身有问题吗?

由changging的renderItem道具功能

 <FlatList 
     data={responseData} 
     renderItem={({item}) => <Text >{item.node.nameWithOwner}</Text>} 
    /> 
解决