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

使用useRouter报错r.usememo #7158

Closed
myNameIsDu opened this issue Jul 25, 2020 · 1 comment
Closed

使用useRouter报错r.usememo #7158

myNameIsDu opened this issue Jul 25, 2020 · 1 comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@myNameIsDu
Copy link

相关平台

微信小程序

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

复现步骤

使用userouter报错R.useMemo is not a function

期望结果

正常使用

实际结果

报错

环境信息

👽 Taro v3.0.0-rc.6


  Taro CLI 3.0.0-rc.6 environment info:
    System:
      OS: macOS 10.15.4
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 12.16.2 - ~/.nvm/versions/node/v12.16.2/bin/node
      npm: 6.14.4 - ~/.nvm/versions/node/v12.16.2/bin/npm
    npmPackages:
      @tarojs/components: 3.0.0-rc.6 => 3.0.0-rc.6 
      @tarojs/mini-runner: 3.0.0-rc.6 => 3.0.0-rc.6 
      @tarojs/react: 3.0.0-rc.6 => 3.0.0-rc.6 
      @tarojs/runtime: 3.0.0-rc.6 => 3.0.0-rc.6 
      @tarojs/taro: 3.0.0-rc.6 => 3.0.0-rc.6 
      @tarojs/webpack-runner: 3.0.0-rc.6 => 3.0.0-rc.6 
      babel-preset-taro: 3.0.0-rc.6 => 3.0.0-rc.6 
      eslint-config-taro: 3.0.0-rc.6 => 3.0.0-rc.6 
      react: ^16.10.0 => 16.13.1 

补充信息

有些地方使用没问题 估计是因为R还没被react赋值吧

@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Jul 25, 2020
@myNameIsDu
Copy link
Author

已解决
image
image
第二个包是脚手架带的 第一个是在2版本用的 切换成2版本的这个就好了

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

No branches or pull requests

1 participant