MCPcopy Create free account
hub / github.com/reactstrap/reactstrap / render

Method render

src/Portal.js:19–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17 }
18
19 render() {
20 if (!canUseDOM) {
21 return null;
22 }
23
24 if (!this.props.node && !this.defaultNode) {
25 this.defaultNode = document.createElement('div');
26 document.body.appendChild(this.defaultNode);
27 }
28
29 return ReactDOM.createPortal(
30 this.props.children,
31 this.props.node || this.defaultNode,
32 );
33 }
34}
35
36Portal.propTypes = propTypes;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected