no message

This commit is contained in:
chenxuan
2024-04-12 13:49:27 +08:00
parent 91bda2ff8f
commit 3d45ed4f9c
51 changed files with 18601 additions and 16000 deletions
-42
View File
@@ -1,42 +0,0 @@
/*
* @Author: chenxuan
* @Date: 2021-11-22 12:52:57
* @LastEditTime: 2022-01-19 15:38:43
* @LastEditors: chenxuan
*/
import React from "react";
import extendsHoc from './components/hoc/extends'
function NoStatusComponents(props) {
return (
<div>
{props.title}
<button type="button" onClick={props.sendParent.bind(this, "xxxx")}>
给父组件传值
</button>
</div>
);
}
class App extends React.Component {
constructor() {
super();
this.state = {
age: 30,
};
}
getValue(val) {
console.log(val);
}
render() {
return (
<div>
<NoStatusComponents
title="我是无状态子组件"
sendParent={this.getValue.bind(this)}
></NoStatusComponents>
<li>{this.props.title}</li>
<li>{this.props.name}</li>
</div>
);
}
}
export default extendsHoc(App,"高阶函数反向继承!");