React Native JSX 标签不匹配



这有点奇怪,我不确定这里发生了什么,所以如果其他人可以看看就太好了。也许我错过了什么。基本上,在我的 render(( 中,打开的标签比关闭的标签多,但它仍然可以构建并且工作正常。当我尝试添加另一个关闭时,它失败了。我需要再添加 2 个标签,但它们也失败了。我错过了什么?

render() {
return (
<View style={{
height: this.state.heightValue
}}>
<FadeInView price={this.props.price}>
<TouchableWithoutFeedback onPress={this._onPressButton.bind(this)}>
<View style={styles.clickableView}>
<View style={styles.topRung}>
<View style={styles.rungLeft}>
<View style={styles.rankBox}>
<Text style={styles.rank}>{this.props.rank}</Text>
</View>
<View style={styles.line}/>
<Text style={styles.coin}>{this.props.long}</Text>
</View>
<View style={styles.rungRight}>
<Price price={this.props.price}/>
</View>
</View>
</View>
</TouchableWithoutFeedback>
</FadeInView>
</View>
);
}

您有 2 个自关闭标签

<View style={styles.line}/>
...
<Price price={this.props.price}/>

<Tag/>"等同于"<Tag></Tag>

最新更新