我正在使用react native和路由我使用react-native-router-flux。我的问题是我想通过单击子视图上的按钮来更改父视图的道具。
Route.js:
...
<Scene key="test" type="replace">
<Scene key="home" component={Home} title="Home"/>
<Scene key="home2" component={HomeTwo} />
</Scene>
Home.js:
...
constructor(){
super();
this.state = {
loading: this.loading
};
...
_goToNextScene(){
Actions.home2();
}
HomeTwo.js:
_changeProps() {
//here I want to change state loading of parentview Home
}
这甚至可能吗?
亲切的问候