-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Navigator跳转不会执行componentDidHide #1614
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
只有点击导航栏的返回按钮才会触发componentDidHide |
@Chen-jj 其他两个都是跳转而已,就B页面有这个逻辑,另外,这个B页面的显示是一个组件来的,不知道和这个有没有关系, export default class B extends Component {
render () {
return (
<View>
<Child ref='child' params={this.$router.params} />
</View>
)
}
}
// Child 这组的代码就是上面的代码了:
class Child extends Component {
componentDidShow () {
console.log('调用componentDidShow')
}
componentDidHide () {
console.log('清除定时器 componentDidHide')
}
} 不知道这样子行么? |
开发者工具调试基础库版本多少? |
2.4.0 |
Taro cli 和项目依赖都升级到最新再试试 |
升级到最新版就ok了,谢谢 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
我有A、B、 C 3个页面,A跳到B跳到C,其中B有个定时器,想要跳转页面时清除掉定时器,现在我发现两个怪异的现象(已在原生小程序测试过):
复现步骤
期望行为
报错信息
系统信息
补充信息
The text was updated successfully, but these errors were encountered: