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

Taro 3.0.8 H5路由未找不触发componentDidNotFound #7474

Closed
huanz opened this issue Aug 31, 2020 · 8 comments
Closed

Taro 3.0.8 H5路由未找不触发componentDidNotFound #7474

huanz opened this issue Aug 31, 2020 · 8 comments
Assignees
Labels
enhancement New feature or request F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Milestone

Comments

@huanz
Copy link
Contributor

huanz commented Aug 31, 2020

相关平台

H5

复现仓库

浏览器版本: Chrome 84
使用框架: React

复现步骤

taro3.0.8版本 h5 打开一个不存在的路由,只会报错 Uncaught (in promise) Error: Route not found,不会触发 componentDidNotFound

期望结果

  1. componentDidNotFound 能够监听到 H5路由不存在

实际结果

  1. 不触发

环境信息

👽 Taro v3.0.8


  Taro CLI 3.0.8 environment info:
    System:
      OS: macOS 10.15.6
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 14.5.0 - /usr/local/bin/node
      Yarn: 1.22.4 - /usr/local/bin/yarn
      npm: 6.14.8 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: 3.0.8 => 3.0.8 
      @tarojs/components: 3.0.8 => 3.0.8 
      @tarojs/mini-runner: 3.0.8 => 3.0.8 
      @tarojs/react: 3.0.8 => 3.0.8 
      @tarojs/runtime: 3.0.8 => 3.0.8 
      @tarojs/taro: 3.0.8 => 3.0.8 
      @tarojs/webpack-runner: 3.0.8 => 3.0.8 
      babel-preset-taro: 3.0.8 => 3.0.8 
      react: ^16.13.1 => 16.13.1 
@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Aug 31, 2020
@huanz
Copy link
Contributor Author

huanz commented Aug 31, 2020

@huanz huanz changed the title Taro 3.0.8 H5路由未找不触发componentDidNotFound & config.h5.router.mode = 'hash' 不生效 Taro 3.0.8 H5路由未找不触发componentDidNotFound Aug 31, 2020
@Chen-jj Chen-jj added this to the 3.0.10 milestone Sep 3, 2020
@huan13140529
Copy link

最新的3.0.8版本一大堆问题,比如无法用this.$router.params获取页面路由参数等,所以不要用最新版吧

@xw-Zhou
Copy link

xw-Zhou commented Oct 14, 2020

最新的3.0.8版本一大堆问题,比如无法用this.$router.params获取页面路由参数等,所以不要用最新版吧

哪个版本比较稳定的,无法获取路由参数这个问题我也遇见了

@Chen-jj Chen-jj removed this from the 3.0.15 milestone Oct 22, 2020
@Chen-jj Chen-jj added the enhancement New feature or request label Oct 22, 2020
@Chen-jj
Copy link
Contributor

Chen-jj commented Oct 22, 2020

@huanz 目前只有微信和字节支持 componentDidNotFound

@huanz
Copy link
Contributor Author

huanz commented Oct 25, 2020

@Chen-jj 是 H5 ,希望支持下

@Grewer
Copy link

Grewer commented Oct 29, 2020

有什么更新吗 同 H5 需要这个功能

@Chen-jj
Copy link
Contributor

Chen-jj commented Oct 29, 2020

我们看看

@Chen-jj
Copy link
Contributor

Chen-jj commented Nov 7, 2020

3.1 支持,App 生命周期 componentDidNotFound 改名为 onPageNotFound

@Chen-jj Chen-jj closed this as completed Nov 7, 2020
This was referenced Feb 24, 2021
@ZakaryCode ZakaryCode added this to Done in H5 Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Archived in project
H5
  
Done
Development

No branches or pull requests

6 participants