Skip to content
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

偶现页面(子组件) useReady 不触发 #12424

Closed
TheKonka opened this issue Sep 2, 2022 · 13 comments · Fixed by #13153, #13157 or #13159
Closed

偶现页面(子组件) useReady 不触发 #12424

TheKonka opened this issue Sep 2, 2022 · 13 comments · Fixed by #13153, #13157 or #13159
Assignees
Labels
bug Something isn't working F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Milestone

Comments

@TheKonka
Copy link
Member

TheKonka commented Sep 2, 2022

相关平台

微信小程序

小程序基础库: 2.24.5
使用框架: React

复现步骤

在tabbar页面自定义tabbar组件,页面和组件内部的 useReady hook 偶现不触发

期望结果

useReady 正常触发

实际结果

useReady 偶现不触发

环境信息


  Taro CLI 3.5.5 environment info:
    System:
      OS: macOS 12.5.1
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 18.4.0 - ~/.nvm/versions/node/v18.4.0/bin/node
      Yarn: 1.22.17 - ~/.yarn/bin/yarn
      npm: 8.12.1 - ~/.nvm/versions/node/v18.4.0/bin/npm
    npmPackages:
      @tarojs/components: 3.5.5 => 3.5.5 
      @tarojs/helper: 3.5.5 => 3.5.5 
      @tarojs/plugin-framework-react: 3.5.5 => 3.5.5 
      @tarojs/plugin-platform-weapp: 3.5.5 => 3.5.5 
      @tarojs/react: 3.5.5 => 3.5.5 
      @tarojs/router: 3.5.5 => 3.5.5 
      @tarojs/runtime: 3.5.5 => 3.5.5 
      @tarojs/shared: 3.5.5 => 3.5.5 
      @tarojs/taro: 3.5.5 => 3.5.5 
      @tarojs/webpack5-runner: 3.5.5 => 3.5.5 
      babel-preset-taro: 3.5.5 => 3.5.5 
      eslint-config-taro: 3.5.5 => 3.5.5 
      react: ^18.2.0 => 18.2.0 
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Sep 2, 2022
@TheKonka
Copy link
Member Author

TheKonka commented Sep 2, 2022

image
image
image

@TheKonka
Copy link
Member Author

TheKonka commented Sep 2, 2022

测试了下应该跟组件没有关系,是整个页面的useReady hook 都没触发

@TheKonka TheKonka changed the title 偶现页面子组件 useReady 不触发 偶现页面(子组件) useReady 不触发 Sep 2, 2022
@xin2014
Copy link

xin2014 commented Sep 5, 2022

useReady 没触发
useLoad 触发了吗
你为什么确定是 bug

@TheKonka
Copy link
Member Author

TheKonka commented Sep 5, 2022

useReady 没触发 useLoad 触发了吗 你为什么确定是 bug

useLoad 触发了。
为什么确定是bug ? 页面的 useReady 不触发 ,这还不叫 bug ?

@Chen-jj
Copy link
Contributor

Chen-jj commented Oct 31, 2022

麻烦提供一下 demo

@huiergo
Copy link

huiergo commented Nov 2, 2022

这个问题解决了吗

@huiergo
Copy link

huiergo commented Nov 2, 2022

这个在v3.4.x的时候还是好使的, 然后到v3.5.7就不好使了

@huiergo
Copy link

huiergo commented Nov 2, 2022

OnReady在ios真机上不调用, 而在微信开发工具 上是调用的 ,代码很简单
class First extends Component {
onReady() {
console.log('【onReady】')
}
}

@sorryljt
Copy link

这个在v3.4.x的时候还是好使的, 然后到v3.5.7就不好使了

我也遇到这个问题了,好无语,在开发工具上好使,到了真机就不触发了

@lanxuexing
Copy link

目前我们也遇到了,在抖音小程序里边,使用iPhone手机真机,出现的频率很高,比较难受,希望是能尽快修复(PS:补充一下,升级到3.5.11依然存在,可以尝试在入口文件里调用这个useReady复现这个问题)

@Chen-jj Chen-jj added the bug Something isn't working label Jan 17, 2023
@Chen-jj
Copy link
Contributor

Chen-jj commented Jan 17, 2023

@TheKonka @lanxuexing @huiergo @sorryljt 感谢反馈!调查后发现是 React18 会导致的问题,将在 Taro v3.5.12 修复。

@vivialex
Copy link

vivialex commented Jun 7, 2024

3.6.28还是会出现这个问题 @Chen-jj

@liu-zhi-fei
Copy link

3.6.30还是会出现这个问题 @Chen-jj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
9 participants