2022-01-21 14:40:00 +08:00
|
|
|
/*
|
|
|
|
|
* @Author: chenxuan
|
|
|
|
|
* @Date: 2021-11-22 12:52:57
|
|
|
|
|
* @LastEditTime: 2022-01-19 15:38:29
|
|
|
|
|
* @LastEditors: chenxuan
|
|
|
|
|
*/
|
|
|
|
|
import React from "react";
|
|
|
|
|
import proxyHoc from "./components/hoc/proxyHoc";
|
|
|
|
|
class App extends React.Component {
|
|
|
|
|
constructor() {
|
|
|
|
|
super();
|
|
|
|
|
this.state = {
|
|
|
|
|
age: 30,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
return (
|
2024-04-12 14:01:58 +08:00
|
|
|
<div className="app1">
|
2022-01-21 14:40:00 +08:00
|
|
|
<h2>当前组件state:{this.state.age}</h2>
|
|
|
|
|
<h2>props:{this.props.title}</h2>
|
|
|
|
|
<h2>props:{this.props.name}</h2>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
export default proxyHoc(App, "高阶函数代理属性参数!");
|