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

使用 linaria 创建的 Navigator 携带的 url 参数无效 #7163

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

使用 linaria 创建的 Navigator 携带的 url 参数无效 #7163

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

Comments

@glitchboyl
Copy link

相关平台

QQ 小程序

复现仓库

https://github.com/glitchboyl/taro-issue
小程序基础库: 1.17.0
使用框架: React

复现步骤


点击 link to test page 控制台会提示报错 <navigator/> should have url attribute when using navigateTo, redirectTo or switchTab

期望结果

能够实现跳转

实际结果

提示报错 <navigator/> should have url attribute when using navigateTo, redirectTo or switchTab

环境信息

👽 Taro v3.0.2


  Taro CLI 3.0.2 environment info:
    System:
      OS: macOS 10.15.6
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 12.16.2 - /usr/local/bin/node
      Yarn: 1.22.4 - /usr/local/bin/yarn
      npm: 6.14.4 - /usr/local/bin/npm
    npmPackages:
      @tarojs/components: 3.0.2 => 3.0.2 
      @tarojs/mini-runner: 3.0.2 => 3.0.2 
      @tarojs/react: 3.0.2 => 3.0.2 
      @tarojs/runtime: 3.0.2 => 3.0.2 
      @tarojs/taro: 3.0.2 => 3.0.2 
      @tarojs/webpack-runner: 3.0.2 => 3.0.2 
      babel-preset-taro: 3.0.2 => 3.0.2 
      eslint-config-taro: 3.0.2 => 3.0.2 
      react: ^16.10.0 => 16.13.1 
@taro-bot2 taro-bot2 bot added F-react Framework - React T-qq Target - 编译到 QQ 小程序 V-3 Version - 3.x labels Jul 25, 2020
@honlyHuang
Copy link
Contributor

honlyHuang commented Aug 5, 2020

linaria 用了 @emotion/is-prop-valid 这个库对 props 进行校验了,在 styled.js 的 https://github.com/callstack/linaria/blob/master/src/react/styled.ts#L88 而 is-prop-valid 似乎只是针对 HTML,如果要用得改 is-prop-valid 的吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-qq Target - 编译到 QQ 小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

3 participants