【发布时间】:2018-08-28 02:44:10
【问题描述】:
我正在使用 genymotion 来运行我的 React Native 开发环境。加载特定组件时,我会收到 console.error 消息:there was a problem sending log messages to your development environment 带有奇怪的堆栈跟踪,它使用 <unknown> 代替几个命名函数。
我将问题缩小到代码中的一个组件:
class Questions extends React.Component {
constructor(props){
super(props);
this.state = {
style: 'all',
selected: ''}
}
render = () => {
return (
<View style={styles.questions}>
<ScrollView>
{(this.props.questions && this.state.style == 'all')&&
this.props.questions.map(post => {
return (
<TouchableHighlight onPress={() => this.loadQuestion(post)} key={post.ID + new Date(post.post_date)} style={styles.questionCard} >
<View style={styles.questionCard} >
<View style={styles.title}>
<Text style={{color: 'white'}}>{post.post_title}</Text>
<Text style={{color: 'white'}}> - {post.display_name} {utils.timeSince(new Date(post.post_date))}</Text>
</View>
</View>
</TouchableHighlight>
)
})
}
</ScrollView>
</View>
)
}
}
每当加载此组件时,我都会收到上面提到的 console.error。我知道这没什么好继续的,我什至不期待答案,但我不知所措。
如果你用谷歌搜索那个确切的错误信息,你会在 Github 上发现一个没有解决的问题,提到它可能是 expo sdk 中的一个错误(这是有道理的)并链接了另一个 404s 问题。
【问题讨论】:
标签: react-native genymotion expo