react 组件
父传子:
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
class Father extends Component {
constructor(props) {
super(props);
this.state = {
name: 'Tom'
};
}
render() {
return (
<div>
<h1>这是父组件</
原创
2020-08-26 21:42:48 ·
165 阅读 ·
0 评论