react-tooltip icon indicating copy to clipboard operation
react-tooltip copied to clipboard

ReactTooltip.show does not work in Functional Components

Open caffeinatedHuman opened this issue 3 years ago • 2 comments

Description:

I want to show the tooltip based on some logic, which means I'll execute ReactTooltip.show to show the Tooltip manually.

As of now, the example in the docs mention passing the reference of the target to the function, which is not working in my case.

Here is a link to the code sandbox I created, showing a sample structure of my code: https://codesandbox.io/s/reacttooltip-sandbox-ovzfe

The click of Show tooltip 3 is not showing the tooltip on the below p tag.

caffeinatedHuman avatar Jul 12 '21 10:07 caffeinatedHuman

Any luck on resolving this as I am having the same problem

penfold45 avatar Nov 05 '21 14:11 penfold45

Any luck on resolving this as I am having the same problem

Yes, I was able to achieve the desired result with the help of useRef

maniac-tech avatar Nov 08 '21 06:11 maniac-tech