findMostFreq(props.ports, 'capabilities.poecapable')
每次触摸const ListNavigator = Type => createStackNavigator({
List: {
screen: PostListContainer,
path: 'list',
params: { Type },
},
viewPost: ViewPostContainer,
}, {
mode: 'card',
headerMode: 'none',
});
const DrawerNavigator = createDrawerNavigator({
Home: AppNavigator,
PostA: {
screen: ListNavigator(0),
},
PostB: {
screen: ListNavigator(1),
},
}, {
drawerWidth: leftMenuWidth,
contentComponent: SlideMenuContainer,
drawerOpenRoute: 'DrawerOpen',
drawerCloseRoute: 'DrawerClose',
drawerToggleRoute: 'DrawerToggle',
});
中的PostA,B
列表的类型更改。
每当类型更改时,我都想调用列表的刷新功能。
如何检测更改?
DrawerNavigation
调用此代码时,值会更改,但看不到更改的时间。
我尝试了const {navigation} = this.props;
const {Type} = navigation.state.params;
componentWillMount()
仅第一次运行,并且在值更改时未执行。