CONTACT US

    react-cool-portal

    A person with short dark hair, wearing a white hoodie, smiles at the camera indoors in front of a wooden door.

    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.
    Chris Lojniewski

    Chris is the CEO of Pagepro, a software house focused on building scalable, high-performance web applications using Next.js and modern headless architectures. Pagepro helps companies move beyond monolithic systems by implementing composable, API-driven platforms that improve performance, flexibility, and long-term maintainability. Chris is a v0 ambassador (https://v0.app/@klojniewski ) and actively explores how AI-assisted development and modern tooling can reduce development friction. His focus is not just on technology choices, but on optimizing delivery processes, architecture decisions, and product scalability.

    Article link copied

    Close button