Home.js
import React, {Component,Fragment} from react;
import ImgA from "../assset/index.jpg"
class Home extends Component {render() {return (<Fragment><div>你好我是组件{parseInt(Math.random()*10)}</div><div>你好我是组件2…
Home,js
import React, {Component} from react;
import News from "./News";
class Home extends Component {constructor(props) {super(props);this.state{text:我是默认值}}dataFun(text)>{console.log(text)this.setState({text})}render() {return (<di…
Home,js
import React, {Component} from react;
import News from "./News";
class Home extends Component {constructor(props) {super(props);this.state{text:我是默认值}}dataFun(text)>{console.log(text)this.setState({text})}render() {return (<di…
app.js
import React from react;import ./App.css;
import Home from ./components/Home.js
import World from "./components/World";
function App() {return (<div className"App">你好<World/></div>);
}export default App;worl…