-
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
父组件和子组件的componentDidShow钩子只会执行一个 #7592
Comments
taro-bot2
bot
added
F-react
Framework - React
T-weapp
Target - 编译到微信小程序
V-3
Version - 3.x
labels
Sep 11, 2020
应该是只有父组建执行吧? |
如果需要在组件里面监听页面的onshow方法怎么办呢?如何实现小程序自定义组件的pageLifetimes.show方法呢 |
遇到类似问题,我只有父组件执行了, 子组件未执行 |
子组件监听页面 onShow/onHide 需要使用事件实现:https://taro-docs.jd.com/taro/docs/next/react#%E5%AD%90%E7%BB%84%E4%BB%B6%E7%9A%84-onshow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
相关平台
微信小程序
小程序基础库: 2.12.2
使用框架: React
复现步骤
期望结果
两个都执行
实际结果
只有子组件的componentDidShow执行了
环境信息
The text was updated successfully, but these errors were encountered: