nk2028/tshet-uinh-autoderiver

Tooltip does not rerender when content changes

graphemecluster opened this issue · 0 comments

const renderTooltip = useCallback(() => {
(document.querySelector("dialog[open]") ?? document.body).appendChild(div);
root.render(
<TooltipAnchor relativeToNodeBox={boxRef.current!} fixedWidth={fixedWidth}>
{element}
</TooltipAnchor>,
);
}, [element, fixedWidth]);

element, as a dependency, cannot be compared correctly since it is a React component.