How do components wrapped by react high-level components operate state? within high-level components

wrote a high-level component

const fn=(Com)=>{
    return class A extends Comonents{
        state={
            list
        }
        return <Com  {...this.props}/>
    }
}

const NewCom = fn(Com);
NewCom  list
May.07,2021

pass the method to the subcomponent, and then call the method in the subcomponent.

const fn=(Com)=>{
    return class A extends Component{
        state={
            list
        }
        handleList = () => {
           // to do ...
           this.setState({
             list: ...
           })
        }
        return <Com handleList={this.handleList} {...this.props}/>
    }
}
class Com extends Components {
    state = {}
    handleList = () => this.props.handleList()
    
    return (
        ....
    )
}

High-level components operate as ordinary components do

const fn=(Com)=>{
    return class A extends Comonents{
        state={
            list
        }
        return <Com list={this.state.list} {...this.props}/>
    }
}

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-1b36a4b-2c023.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-1b36a4b-2c023.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?