react-tooltip
react-tooltip copied to clipboard
Re-rendering unnecessarily?
I've been optimising across my app recently using "why-did-you-update"
It's triggering on react-tooltip quite a bit:
Is there any way you could optimise this via PureComponent or shouldComponentUpdate?
i got the same problem, render performance is very slow especially in IE11 - probably because of react-tooltip, because it is the only component that shows up with why-did-you-update.
Personally, I would advise against using this library in any React app. Visually, it looks really good and slick....but It's reliance on dom-attribute-scraping severely breaks some key react precepts and hence leads to the various performance issues present.
As it stands, it is an admirable, yet naive approach at implementing a Tooltip system in React. Akin more to a JQuery way of achieving the same.
To the Author, best way to properly achieve something like this in React is to give your users a <Tooltip text="...">...</Tooltip>
component to wrap their hoverables with. That Tooltip component can then build itself as needed and can smoothly satisfy dynamic rendering needs as well.