摘要:
传统HTML: <button onclick = "f1()"> Activate Lasers </button> React: <button onclick = {f1()}> Activate Lasers </button> 绑定this:==> onClick = {this.hand 阅读全文
posted @ 2020-12-15 17:56
病阳阳
阅读(85)
评论(0)
推荐(0)
摘要:
生命周期: mount(挂载) uunmount(卸载) componentDidMount() 组件渲染到DOM后运行 未完待续... 阅读全文
posted @ 2020-12-15 17:20
病阳阳
阅读(59)
评论(0)
推荐(0)
摘要:
定义javascript函数组件: function zjName (props) { return <h1>Hello, {props.name}</h1>; } 使用ES6的class定义组件: class zjName extends React.Component { render() { 阅读全文
posted @ 2020-12-15 15:12
病阳阳
阅读(84)
评论(0)
推荐(0)