import React, { Component } from 'react';
class NotFound extends Component {
render() {
return (
<div> 404NotFound </div>
);
}
}
// 自定义一个connect
function QConnenct(cb, obj) {
var value = cb()
return (MyComponent) => {
return (props) => {
console.log(props);
return <div style={{ color: 'red' }}>
<MyComponent {...value} {...props} {...obj} />
</div>
}
}
}
export default QConnenct(() => {
return {
a: 1,
b: 2
}
}, {
aa() {
},
bb() {
}
})(NotFound)