How to create a portal?

renderTooltip = node => {
 console.log("renderTooltip", node); //{$$typeof: Symbol(react.element), type: "span", key: null ref: null, props: {...}, ...}
 ReactDOM.createPortal(node, document.querySelector("#root"));
 };


Somehow, nothing appears in the root container
Prompt.
March 12th 20 at 07:58
1 answer
March 12th 20 at 08:00
Solution
return forgot before ReactDOM.createPortal

Find more questions by tags React