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/6ok/Taro.Event.State.Bug 小程序基础库: 2.18.1 使用框架: React
使用Taro.eventCenter处理事件,获取state时,state的值恒为初始值
state为最新值
state为初始值
👽 Taro v3.3.1 Taro CLI 3.3.1 environment info: System: OS: Windows 10 Binaries: Node: 14.17.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.10 - C:\Users\liuke\AppData\Roaming\npm\yarn.CMD npm: 6.14.13 - C:\Program Files\nodejs\npm.CMD
The text was updated successfully, but these errors were encountered:
demo 里 useReady 渲染时只执行了一次,Taro.eventCenter.on("showNumber", handleShowNumber) 闭包了呀~
Sorry, something went wrong.
demo 里 useReady 渲染时只执行了一次,Taro.eventCenter.on("showNumber", handleShowNumber) 闭包了呀~ @jjjyy 请教下 我应该怎么写解决这个问题呢
No branches or pull requests
相关平台
微信小程序
复现仓库
https://github.com/6ok/Taro.Event.State.Bug
小程序基础库: 2.18.1
使用框架: React
复现步骤
使用Taro.eventCenter处理事件,获取state时,state的值恒为初始值
期望结果
state为最新值
实际结果
state为初始值
环境信息
The text was updated successfully, but these errors were encountered: