What are portals in React?

Answer

Portal is a recommended way to render children into a DOM node that exists outside the DOM hierarchy of the parent component.

Eg- ReactDOM.createPortal(child, container)
The first argument is any render-able React child, such as an element, string, or fragment.
The second argument is a DOM element.

All react js Questions

Ask your interview questions on react-js

Write Your comment or Questions if you want the answers on react-js from react-js Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---