The Class returned by high-level components cannot be rendered.

the component returned to the class wrapper using high-level components cannot be rendered correctly, but the component return can be rendered directly, and the problem can not be found. Please advise. Thank you

function HOC(WrappedComponent){
    // 
    return class HOC extends Component {
        render(){
            const newProps = {type:"HOC"};
            return <WrappedComponent {...this.props} {...newProps}/>
        }
    }
    // 
    // return function newRender(props){
    //     return <WrappedComponent />
    // }
}

class OriginComponent extends Component {
    render(){
        return <div></div>
    }
}

const newComponent = HOC(OriginComponent)

class TestHOCCom extends Component{
    constructor(){
        super()
        this.state = {
        }
    }
    render() {
        // console.log(newComponent, 9999999)
        return (
            <div>
                

<newComponent /> </div> ) } } export default TestHOCCom
Apr.02,2021

const NewComponent = HOC(OriginComponent)
<NewComponent />

be sure to use the first letter in uppercase, or jsx will compile it into a string tag.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e46320-43146.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e46320-43146.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?