Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you may not be able to execute some actions.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
state= { arr: [] } addArr = () => { this.setState({ arr: [1, 2, 3, 4] }) } this.addArr() <View className={arr.length > 2 'a' : 'b'}></View> 结果渲染class还是b
className={arr.length > 2? 'a' : 'b'} 谢谢