module.exports= class APP extends React.Component {
constructor(props){
super(props);
this.state = {
key1:'key1',
key2:'key2'
};
render() {
return (
<View>
<Button
onPress={this.goToTisch}>
1
</Button>
<Button
onPress={this.goToTisch}>
2
</Button>
</View>
);
}
}
私はreact-nativeでアプリを書くだけで、子要素から親状態を更新する方法はわかりません。事前にありがとう反応ネイティブの子と親の間でデータを渡す方法はありますか?
ありがとう!私はそれをチェックした。 – user6094105
これを実行する際に、「既存の状態遷移中に更新できません」という現象が発生する – Hugo