12
我的角度開發和新的反應,這是簡單的反應組件,但不工作使用JSX react/react-in-jsx-scope時,'React'必須在範圍內嗎?
import react , { Component} from 'react';
import { render } from 'react-dom';
class TechView extends Component {
constructor(props){
super(props);
this.state = {
name:'Gopinath'
}
}
render(){
return(
<span>hello Tech View</span>
);
}
}
export default TechView;
錯誤: 「陣營」必須在使用範圍時JSX反應/反應功能於jsx-範圍