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://git.undefined.com 小程序基础库: 2.14.0 使用框架: React
根据官方脚手架初始化项目,分别在页面及组件内容添加 componentDidShow ,页面内可以触发,组件无法触发
组件触发componentDidShow
组件内未触发componentDidShow
Taro CLI 3.0.17 environment info: System: OS: macOS 11.1 Shell: 5.8 - /bin/zsh Binaries: Node: 12.18.3 - ~/.nvs/default/bin/node Yarn: 1.22.4 - ~/.yarn/bin/yarn npm: 6.14.6 - ~/.nvs/default/bin/npm npmPackages: @tarojs/components: 3.0.10 => 3.0.10 @tarojs/mini-runner: 3.0.10 => 3.0.10 @tarojs/react: 3.0.10 => 3.0.10 @tarojs/runtime: 3.0.10 => 3.0.10 @tarojs/taro: 3.0.10 => 3.0.10 @tarojs/webpack-runner: 3.0.10 => 3.0.10 babel-preset-taro: 3.0.10 => 3.0.10 eslint-config-taro: 3.0.10 => 3.0.10 react: ^16.10.0 => 16.14.0
The text was updated successfully, but these errors were encountered:
https://docs.taro.zone/docs/next/react#%E5%AD%90%E7%BB%84%E4%BB%B6%E7%9A%84-onshow
Sorry, something went wrong.
这个2.x版本会加上吗?
@gxsandzxl 2.x 每个 React Component 都对应一个小程序自定义组件,应该是可以直接使用 onShow onHide 的
onShow
onHide
@Chen-jj 不好意思,忘记说明了,是2.x的H5环境。 我说一下我的问题吧。 主要是H5的子组件的componentDidShow无法触发,但可以通过页面组件调用子组件的方法来代替实现。但是最近接入了redux,有个ref问题官方一直没有解决,导致现在两种方法都失效了。
想请问一下官方近期对这两个问题有计划解决吗?
No branches or pull requests
相关平台
微信小程序
复现仓库
https://git.undefined.com
小程序基础库: 2.14.0
使用框架: React
复现步骤
根据官方脚手架初始化项目,分别在页面及组件内容添加 componentDidShow ,页面内可以触发,组件无法触发
期望结果
组件触发componentDidShow
实际结果
组件内未触发componentDidShow
环境信息
The text was updated successfully, but these errors were encountered: