In the class component,we can use ReactDom.findDOMNode(this) to get DOM element: class Collapse { componentDidMount() { ReactDom.findDOMNode(this) ; } return this.props.children; } But how can I get it in React Hook without 'this';