提供了以下代码: class Person {
constructor(name) {
this.name = name;
}
sayHello() {
console.log('Hello, my name is ' + this.name);
}
sayHelloAndBy() {
this.sayHello
我在尝试将无状态组件导入到我的App.js中以运行时收到错误type is invalid。当我在App.js中运行相同的代码时,它工作得很好,但是当我导入它时,它会中断。这里有什么解决方案,发生了什么? 预先感谢您 我mobile.js import React from 'react';
//this part will be imported via a component. Need