当我在普通模式下调试时,我只有一个按钮没有结果,当我在模式Js上远程调试时,我得到了预期的结果,当我在Google中搜索时,我发现当我在模式js上远程调试时,代码会编译使用V8 Google机器,并在正常模式下将在手机中编译
render() {
let newArray =
this.state.responseValue &&
this.state.responseValue.map((item, key) => {
return (
<View key={key}>
<Bubble style={styles.bubbleStyle}> {item}</Bubble>
</View>
);
});
let i = 0;
return (
<ThemeProvider>
<View style={styles.container}>
<ScrollView>
<View style={{ flex: 1, padding: 4 }}>{newArray}</View>
</ScrollView>
<View style={styles.ButtonView}>
{valuesCurrentState.length > 0 ? (
<Button onPress={() => this.handle(1)}>{this.state.value1}</Button>
) : null}
{valuesCurrentState.length > 1 ? (
<Button onPress={() => this.handle(2)}>{this.state.value2}</Button>
) : null}
{valuesCurrentState.length > 2 ? (
<Button onPress={() => this.handle(3)}>{this.state.value3}</Button>
) : null}
{valuesCurrentState.length > 3 ? (
<Button onPress={() => this.handle(4)}>{this.state.value4}</Button>
) : null}
</View>
</View>
</ThemeProvider>
);
}