This is a React hook for Portals. It helps you render children into a DOM node that exists outside the DOM hierarchy of the parent component.
Features:
- ๐ Renders an element or component to <body> or a specified DOM element.
- ๐ฃ React Portals feat. Hook.
- ๐ค Built-in state controllers, event listeners and many useful features for a comprehensive DX.
- ๐งฑ Used as a scaffold to build your customized hook.
- ๐งน Auto remove un-used portal container for you. Doesn’t produce any DOM mess.
- ๐ Support TypeScript type definition.
- ๐๏ธ Server-side rendering compatibility.
- ๐ฆ Tiny size (~ 1.4KB gzipped). No external dependencies, aside for the react and react-dom.