"解决react-navigation封装组件里无法使用"
Published on Aug. 22, 2023, 12:09 p.m.
封装类似这样
<Card data={item} navigation={this.props.navigation} />;
封装组件里使用
static propTypes = {navigation: PropTypes.object};
使用
this.props.navigation.navigate(“CScreen”);
Published on Aug. 22, 2023, 12:09 p.m.
封装类似这样
<Card data={item} navigation={this.props.navigation} />;
封装组件里使用
static propTypes = {navigation: PropTypes.object};
使用
this.props.navigation.navigate(“CScreen”);