If you need to render a child into a different DOM node, outside of the parent DOM hierarchy, you would use a React Portal.
- Bridge
- Gateway
- Passage
- Portal
When you need to render a child component into a different DOM node, outside of the parent DOM hierarchy, React Portals are the appropriate choice. They act as a bridge or gateway to render content in a different place in the DOM while maintaining React's component structure and functionality.
Loading...
Related Quiz
- Is Hooks cover all use cases for classes?
- Can you describe the componentDidCatch lifecycle method signature?
- What is the difference between super() and super(props) in React using ES6 classes?
- React's ________ ensures that only the objects that have changed are updated, leading to efficient DOM updates.
- When to use a Class Component over a Function Component?