question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What exactly does ReactTooltip rebuild do, and when is it required?

See original GitHub issue

Thanks for this awesome library. I had a question about the static rebuild method.

I have been using ReactTooltip in my application and it works in certain places. The places that it doesn’t work in requires a rebuild (like below) to make it work.

componentDidUpdate() {
    ReactTooltip.rebuild();
}

When exactly is it necessary to do a rebuild? And what is it doing? Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:21
  • Comments:7

github_iconTop GitHub Comments

6reactions
powelskicommented, Dec 15, 2021

I was thinking, why is React Tooltip designed in a way that needs rebuilding? Why doesn’t it use mouse over event on the container to find pointed element’s potential tooltips? The way it works now, with the rebuild, feels very jQuery-esque.

6reactions
xheorycommented, Mar 1, 2019

@CWSites I just ran into this and it appears to be related to components with the data-for props loading later than the ReactTooltip component.

E.g. I had a dynamically loading infinite scrolling feed, and the first ‘page’ loaded the tooltip correctly for all its subcomponents. I use one tooltip to cover all those elements, which worked fine for the entries that were loaded before the tooltip was. However, if I loaded more content afterwards, the tooltip would not show for newer content. Calling rebuild() after loading new content fixed that, as it rebinds the newly loaded data-for-containing components to the tooltip.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What exactly does ReactTooltip rebuild do, and when is it ...
I have been using ReactTooltip in my application and it works in certain places. The places that it doesn't work in requires a...
Read more >
What exactly does ReactTooltip rebuild do, and when is it required?
I have been using ReactTooltip in my application and it works in certain places. The places that it doesn't work in requires a...
Read more >
React-tooltip doesn't show on conditional render
You need to rebuild your tooltips with ReactTooltip.rebuild post a render and ... components with hooks, you can do so with useEffect hooks...
Read more >
Top 5 react-tooltip Code Examples - Snyk
Learn more about how to use react-tooltip, based on react-tooltip code examples ... Use Snyk Code to scan source code in minutes -...
Read more >
Build a React tooltip from scratch - YouTube
Copy link. Info. Shopping. Tap to unmute. If playback doesn't begin shortly, try restarting your device. Your browser can 't play this video....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found