0.0.5 • Published 7 months ago

@lmnl/portal v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

lmnl portal

Portal allows you to define components as you normally would, and output them to an <Outlet /> somewhere else in your app e.g. rendering a modal at the root.

// Root.tsx
import { Provider, Outlet } from '@lmnl/portal'

export function Root() {
  return (
    <View>
      <App />

      <Outlet />
    </View>
  )
}
// components/Component.tsx
import { Portal } from '@lmnl/portal'

export function Component() {
  return (
    <View>
      <Text>My nested component</Text>

      <Portal>
        {/* Renders to <Outlet /> on mount */}
        <PortaledComponent />
      </Porta>
    </View>
  )
}
0.0.5

7 months ago

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago

0.0.0

7 months ago