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로 응용 프로그램을 작성하고 자식 요소에서 부모 상태를 업데이트하는 방법을 모릅니다. 사전에 감사합니다react-native에서 자식과 부모간에 데이터를 전달하는 방법은 무엇입니까?
감사합니다! 나는 그것을 검사했다. – user6094105
이 작업을 수행 할 때 "기존 상태 전환 중에 업데이트 할 수 없습니다"라는 메시지가 나타납니다. – Hugo