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
微信小程序
小程序基础库: 2.14.1 使用框架: React
自定义tabbar,然后再tabbar组件中使用useRouter来匹配当前的激活的tab。 默认首页是可以生效的, 但是一旦发生Taro.switchTab后,useRouter会出现null,导致无法匹配到正确的激活项
希望能解决这个问题。
useRouter执行结果为nul
Taro CLI 3.1.2 environment info: System: OS: Windows 10 Binaries: Node: 14.15.0 - D:\software\nodejs\node.EXE Yarn: 1.23.0-20200306.1615 - D:\software\yarn\bin\yarn.CMD npm: 6.14.8 - D:\software\nodejs\npm.CMD
The text was updated successfully, but these errors were encountered:
不建议这样做,还是推荐使用状态管理工具进行管理。
详细原因在此处有说明:#7302 (comment)
Sorry, something went wrong.
No branches or pull requests
相关平台
微信小程序
小程序基础库: 2.14.1
使用框架: React
复现步骤
自定义tabbar,然后再tabbar组件中使用useRouter来匹配当前的激活的tab。
默认首页是可以生效的,
但是一旦发生Taro.switchTab后,useRouter会出现null,导致无法匹配到正确的激活项
期望结果
希望能解决这个问题。
实际结果
useRouter执行结果为nul
环境信息
The text was updated successfully, but these errors were encountered: