Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Hide ReactTooltip after hover off

const [tooltip, showTooltip] = useState(true);

<>
 {tooltip && <ReactTooltip effect="solid" />}
 <p
   data-tip="hello world"
   onMouseEnter={() => showTooltip(true)}
   onMouseLeave={() => {
     showTooltip(false);
     setTimeout(() => showTooltip(true), 50);
   }}
 />
</>
Source by bugsfixing.com #
 
PREVIOUS NEXT
Tagged: #Hide #ReactTooltip #hover
ADD COMMENT
Topic
Name
8+3 =