Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

createPortal usage

render() {
  // React does *not* create a new div. It renders the children into `domNode`.
  // `domNode` is any valid DOM node, regardless of its location in the DOM.
  return ReactDOM.createPortal(
    this.props.children,
    domNode
  );
}
Source by reactjs.org #
 
PREVIOUS NEXT
Tagged: #createPortal #usage
ADD COMMENT
Topic
Name
8+6 =