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
微信小程序
https://github.com/ilp64/taro_mobx_reproduce 小程序基础库: 2.14.1 使用框架: React
import React, { Component } from 'react'; import Taro from '@tarojs/taro'; import { observer, inject } from 'mobx-react'; @inject('store') @observer export class LoginGuard extends Component { ...... }
...... import { LoginGuard } from '../../guards/login.guard'; console.log('这里不是一个函数或者类了', LoginGuard); class Index extends LoginGuard { render () { return ( <View className='index'>🐞🐞🐞</View> ); } } export default Index;
VM338:1 TypeError: Super expression must either be null or a function ......
希望被inject装饰后也能够被继承
我在taro 2的版本里面使用这种写法是没问题的,现在升级到3的时候碰到了这个问题。
👽 Taro v3.0.21 Taro CLI 3.0.21 environment info: System: OS: macOS 10.14.6 Shell: 3.2.57 - /bin/bash Binaries: Node: 14.15.1 - ~/.nvm/versions/node/v14.15.1/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.8 - ~/.nvm/versions/node/v14.15.1/bin/npm npmPackages: @tarojs/components: 3.0.21 => 3.0.21 @tarojs/mini-runner: 3.0.21 => 3.0.21 @tarojs/react: 3.0.21 => 3.0.21 @tarojs/runtime: 3.0.21 => 3.0.21 @tarojs/taro: 3.0.21 => 3.0.21 @tarojs/webpack-runner: 3.0.21 => 3.0.21 babel-preset-taro: 3.0.21 => 3.0.21 eslint-config-taro: 3.0.21 => 3.0.21 react: ^16.10.0 => 16.14.0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
相关平台
微信小程序
复现仓库
https://github.com/ilp64/taro_mobx_reproduce
小程序基础库: 2.14.1
使用框架: React
复现步骤
1. 使用mobx-react inject装饰类组件
2. 在其他页面组件中继承这个类
3. 第2步编译能通过,但是在微信开发者工具里面会报运行时错误
VM338:1 TypeError: Super expression must either be null or a function
......
期望结果
希望被inject装饰后也能够被继承
实际结果
我在taro 2的版本里面使用这种写法是没问题的,现在升级到3的时候碰到了这个问题。
环境信息
The text was updated successfully, but these errors were encountered: