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

【H5】"export 'useSelector' was not found in '@tarojs/redux-h5' #3447

Closed
benny-eu opened this issue Jun 17, 2019 · 19 comments
Closed

【H5】"export 'useSelector' was not found in '@tarojs/redux-h5' #3447

benny-eu opened this issue Jun 17, 2019 · 19 comments
Assignees

Comments

@benny-eu
Copy link

问题描述
[问题描述:站在其它人的角度尽可能清晰地、简洁地把问题描述清楚]

h5, 未导出useSelector

复现步骤
[复现问题的步骤]

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

期望行为
[这里请用简洁清晰的语言描述你期望的行为]

报错信息
1560740460054

系统信息

Taro CLI 1.3.1 environment info:
    System:
      OS: macOS 10.14
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.15.1 - ~/.nvm/versions/node/v10.15.1/bin/node
      Yarn: 1.13.0 - /usr/local/bin/yarn
      npm: 6.4.1 - ~/.config/yarn/global/node_modules/.bin/npm
    npmPackages:
      @tarojs/async-await: ^1.3.1 => 1.3.1 
      @tarojs/cli: ^1.3.1 => 1.3.1 
      @tarojs/components: 1.3.1 => 1.3.1 
      @tarojs/plugin-babel: 1.3.1 => 1.3.1 
      @tarojs/plugin-csso: 1.3.1 => 1.3.1 
      @tarojs/plugin-sass: 1.3.1 => 1.3.1 
      @tarojs/plugin-uglifyjs: 1.3.1 => 1.3.1 
      @tarojs/redux: ^1.3.1 => 1.3.1 
      @tarojs/redux-h5: ^1.3.1 => 1.3.1 
      @tarojs/rn-runner: 1.3.1 => 1.3.1 
      @tarojs/router: 1.3.1 => 1.3.1 
      @tarojs/taro: ^1.3.1 => 1.3.1 
      @tarojs/taro-alipay: 1.3.1 => 1.3.1 
      @tarojs/taro-h5: 1.3.1 => 1.3.1 
      @tarojs/taro-swan: 1.3.1 => 1.3.1 
      @tarojs/taro-tt: 1.3.1 => 1.3.1 
      @tarojs/taro-weapp: 1.3.1 => 1.3.1 
      @tarojs/webpack-runner: 1.3.1 => 1.3.1 
      eslint-config-taro: 1.3.1 => 1.3.1 
      eslint-plugin-taro: 1.3.1 => 1.3.1 
      nerv-devtools: ^1.4.0 => 1.4.0 
      nervjs: ^1.4.0 => 1.4.0

补充信息
[可选]
[根据你的调查研究,出现这个问题的原因可能在哪里?]

@taro-bot
Copy link

taro-bot bot commented Jun 17, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@yuche
Copy link
Contributor

yuche commented Jun 17, 2019

更新 nerv-redux 到 1.4.1

@benny-eu
Copy link
Author

更新 nerv-redux 到 1.4.1

请问怎么更新? 更新nervjs后依然报错

@yuche
Copy link
Contributor

yuche commented Jun 17, 2019

cd node_modules/@tarojs/redux-h5
npm i nerv-redux@latest
  1. 把 node_modules 和各种 lock 清空重装也应该可以。

@taro-bot
Copy link

taro-bot bot commented Jun 17, 2019

Hello~

您的问题楼上已经提供了解决方案,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。

如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。

Good luck and happy coding~

@vonweb
Copy link

vonweb commented Jun 17, 2019

安装nerv-redux可以吗???
打包出来的也没有依赖nerv-redux啊
@yuche 是不是得更新redux-h5/react-redux

@yuche yuche removed question Further information is requested resolved labels Jun 17, 2019
@yuche
Copy link
Contributor

yuche commented Jun 17, 2019

taro redux 需要在 h5 对路由做一些特殊处理,不能直接引用 nerv-redux。因此 useSelector 等 API 可能会迟点在 h5 实现。

@yuche yuche added the H5 label Jun 17, 2019
@taro-bot
Copy link

taro-bot bot commented Jun 17, 2019

CC @Littly

@Jokcy
Copy link

Jokcy commented Jul 26, 2019

能快点支持么?或者提供贡献支持,公司之前小程序用taro做,全部用的useSelector,结果现在要转到h5说不支持,那好歹要在文档上有体现啊-。-

@GeorgeZhangZHY
Copy link

请问有什么进度更新或者临时workaround吗?

@chenlongwill
Copy link

h5大概还要多久支持useSelector?

@yz1311
Copy link

yz1311 commented Nov 15, 2019

真是好大的坑,幸好暂时不需要h5

@vaakian
Copy link

vaakian commented Nov 15, 2019

走坑+1

@funyaliga
Copy link

等到脖子都长了

@K-walker
Copy link

useDispatch , useSelector 这2个api在H5啥时候才能实现啊亲

@chm1n9
Copy link

chm1n9 commented Nov 27, 2019

之前大力推广了一波函数式组件,结果h5 不支持,有点尴尬啊。公司突然要做h5版的,一跑起来这样...

@calimanco
Copy link

可以参考我的解决办法。
#4981

@gujintao1900
Copy link

这个问题,现在有解决没?

@Chen-jj
Copy link
Contributor

Chen-jj commented Jul 3, 2020

Taro 3 能直接使用 redux,应该没有这个问题了

@Chen-jj Chen-jj closed this as completed Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests