We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
微信小程序
https://github.com/wanxiankai/taro-dome-v3 小程序基础库: 2.16.1 使用框架: React
下载项目之后 yarn 安装依赖 yarn dev:weapp 运行项目 可以看到组件中的didshow 生命周期没有执行
类组件 componentDidShow 正常执行
首次进入或者返回 ,类组件 componentDidShow 不执行
Taro v3.2.0 Taro CLI 3.2.0 environment info: System: OS: macOS 10.15.7 Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.21.0 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.11 - /usr/local/bin/npm npmPackages: @tarojs/components: 3.2.0 => 3.2.0 @tarojs/mini-runner: 3.2.0 => 3.2.0 @tarojs/react: 3.2.0 => 3.2.0 @tarojs/runtime: 3.2.0 => 3.2.0 @tarojs/taro: 3.2.0 => 3.2.0 @tarojs/webpack-runner: 3.2.0 => 3.2.0 babel-preset-taro: 3.2.0 => 3.2.0 eslint-config-taro: 3.2.0 => 3.2.0 react: ^17.0.0 => 17.0.2 npmGlobalPackages: typescript: 3.5.3
The text was updated successfully, but these errors were encountered:
只有页面组件才能监听到 页面生命周期函数。下级组件的话:函数组件可以使用 Hooks, 类组件参照官方文档实现监听 https://taro-docs.jd.com/taro/docs/react#componentdidshow-
页面组件
Sorry, something went wrong.
@ivan-94 正解
No branches or pull requests
相关平台
微信小程序
复现仓库
https://github.com/wanxiankai/taro-dome-v3
小程序基础库: 2.16.1
使用框架: React
复现步骤
下载项目之后 yarn 安装依赖
yarn dev:weapp 运行项目
可以看到组件中的didshow 生命周期没有执行
期望结果
类组件 componentDidShow 正常执行
实际结果
首次进入或者返回 ,类组件 componentDidShow 不执行
环境信息
The text was updated successfully, but these errors were encountered: