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

nextTick 在微信小程序 usePageScroll 内不执行 #10179

Closed
ickg5 opened this issue Sep 2, 2021 · 0 comments · Fixed by #10188
Closed

nextTick 在微信小程序 usePageScroll 内不执行 #10179

ickg5 opened this issue Sep 2, 2021 · 0 comments · Fixed by #10188
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Milestone

Comments

@ickg5
Copy link
Contributor

ickg5 commented Sep 2, 2021

相关平台

微信小程序

复现仓库

https://github.com/taroify/taro330-nexttick
小程序基础库: 2.19.2
使用框架: React

复现步骤

nextTick 在微信小程序 usePageScroll 内不执行

function NextTick() {

  usePageScroll(() => {
    console.log("usePageScroll")
    nextTick(() => console.log("usePageScroll nextTick"))
  })

  return (
    <View style={{height: "200vh"}}/>
  );
}

H5 中的效果

h5

weapp 中的效果

weapp

期望的结果是 weapp 和 h5 一样。

期望结果

nextTick 在 usePageScroll 中执行

实际结果

nextTick 在 usePageScroll 中不执行

环境信息

� Taro v3.3.5


  Taro CLI 3.3.5 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 14.17.1 - C:\Programs\nodejs\node-v14.17.1-win-x64\node.EXE
      Yarn: 1.22.11 - C:\Programs\nodejs\node\yarn.CMD
      npm: 6.14.13 - C:\Programs\nodejs\node-v14.17.1-win-x64\npm.CMD

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

Successfully merging a pull request may close this issue.

2 participants