After react has passed the connect package, the this.props.children cannot be obtained. How to solve the problem?

when I tried to implement redux, I had a whim to try to get the nested child elements, but found that after connect, this.props.children could not get

.

related codes

Home.js

import React, { Component } from "react"
// react-redux
import { connect } from "../my-react-redux"


class Home extends Component {

  constructor(props, context){
    super(props, context)
  }

  componentDidMount(){
    console.log(this.props.children)   // underfind
  }

  render() {
    const { num } = this.props
    return (
      <div>
        {this.props.children}
      </div>
    )
  }
}

const mapStateToProps = state=> ({
  num: state.num
})
const mapDispatchToProps = dispatch => ({

})
                                         // connect 
export default connect(mapStateToProps,mapDispatchToProps)(Home)

Code of App.js

class App extends Component {
  render() {
    return (
      <div >
        <Provider store={store}>
          <Home>
            <h3 style={{color:"red"}}>h3</h3>
          </Home>
        </Provider>
      </div>
    );
  }
}
export default App;
Apr.12,2021
Menu