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

Function convertRender

packages/preact-devtools/src/devtools.tsx:137–154  ·  view source on GitHub ↗
(
  Component: PluginRender,
  setComponents: (
    value:
      | Record<string, JSX.Element>
      | ((prev: Record<string, JSX.Element>) => Record<string, JSX.Element>),
  ) => void,
  e: HTMLElement,
  props: TanStackDevtoolsPluginProps,
)

Source from the content-addressed store, hash-verified

135}
136
137const convertRender = (
138 Component: PluginRender,
139 setComponents: (
140 value:
141 | Record<string, JSX.Element>
142 | ((prev: Record<string, JSX.Element>) => Record<string, JSX.Element>),
143 ) => void,
144 e: HTMLElement,
145 props: TanStackDevtoolsPluginProps,
146) => {
147 const element =
148 typeof Component === 'function' ? Component(e, props) : Component
149
150 setComponents((prev) => ({
151 ...prev,
152 [e.getAttribute('id') as string]: element,
153 }))
154}
155
156const convertTrigger = (
157 Component: TriggerRender,

Callers 1

TanStackDevtoolsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected