MCPcopy Index your code
hub / github.com/TanStack/devtools / convertRender

Function convertRender

packages/react-devtools/src/devtools.tsx:119–134  ·  view source on GitHub ↗
(
  Component: PluginRender,
  setComponents: React.Dispatch<
    React.SetStateAction<Record<string, JSX.Element>>
  >,
  e: HTMLElement,
  props: TanStackDevtoolsPluginProps,
)

Source from the content-addressed store, hash-verified

117}
118
119const convertRender = (
120 Component: PluginRender,
121 setComponents: React.Dispatch<
122 React.SetStateAction<Record<string, JSX.Element>>
123 >,
124 e: HTMLElement,
125 props: TanStackDevtoolsPluginProps,
126) => {
127 const element =
128 typeof Component === 'function' ? Component(e, props) : Component
129
130 setComponents((prev) => ({
131 ...prev,
132 [e.getAttribute('id') as string]: element,
133 }))
134}
135
136const convertTrigger = (
137 Component: TriggerRender,

Callers 1

TanStackDevtoolsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected