Function
convertRender
(
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 | |
| 137 | const 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 | |
| 156 | const convertTrigger = ( |
| 157 | Component: TriggerRender, |
Tested by
no test coverage detected