ReactTooltip / react-tooltip

React Tooltip Component
https://react-tooltip.com/
MIT License
3.61k stars 527 forks source link

[BUG] #1231

Open Karan09542 opened 1 week ago

Karan09542 commented 1 week ago

const [more, setMore] = useState(false) state work right:


"more" value also change But? problem is that - if more changes then true condition of "more" is render(toggle) but not false condition | our mean is that false condition not toggle it remains as it was

simple says: if 'more' condition is false then both render simulteneously

image

we try different way but it not work like this: true condition toggle => if condition false then both render together

more ? <Tooltip render-something />: <Tooltip render-anotherSomething /> ` on asking chat gpt then he say use => useEffect but not work then it SAYS

If the tooltip content is still not updating dynamically based on the more state, the tooltip library might indeed be caching the content or not re-rendering as expected.

It sounds like your tooltip content isn't updating when the more state changes. This often happens when the component using the render function doesn't re-render on state updates or when the tooltip library caches the content based on initial render values.

these are image:

image image

one more issue also happening

when using this on any element then a border surrounds element dark dark border its seem like a outline come in non form element image

सीताराम हर हर महादेव

danielbarion commented 2 days ago

@Karan09542 please check: https://codesandbox.io/p/sandbox/gallant-leftpad-8kvtn7

It looks like the conditional rendering is working, can you please provide one codesandbox with the issue so I can reproduce it and verify?