MCPcopy Create free account
hub / github.com/TanStack/devtools / Portal

Function Portal

packages/preact-devtools/src/devtools.tsx:120–135  ·  view source on GitHub ↗
({
  children,
  container,
}: {
  children: JSX.Element
  container: HTMLElement
})

Source from the content-addressed store, hash-verified

118
119// Simple portal component for Preact
120function Portal({
121 children,
122 container,
123}: {
124 children: JSX.Element
125 container: HTMLElement
126}) {
127 useEffect(() => {
128 render(children, container)
129 return () => {
130 render(null, container)
131 }
132 }, [children, container])
133
134 return null
135}
136
137const convertRender = (
138 Component: PluginRender,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected