MCPcopy Create free account
hub / github.com/testing-library/react-testing-library / componentDidMount

Method componentDidMount

src/__tests__/render.js:41–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39 this.portalNode.dataset.testid = 'my-portal'
40 }
41 componentDidMount() {
42 document.body.appendChild(this.portalNode)
43 }
44 componentWillUnmount() {
45 this.portalNode.parentNode.removeChild(this.portalNode)
46 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected