Portal

Portal is a component used to escape the application DOM tree. Children of the portal will be rendered as a child of the container.

Example

import { Portal } from "kaioken"

function App() {
  return (
    <div>
      <h1>Hello world!</div>
      <Portal container={() => document.getElementById("portal-root")}>
        <h2>Hello from the portal!</h2>
      </Portal>
    </div>
  )
}