So.. all the tooltips work if I use it on html direct like <button data-tip="test" />
But If I use a component <Help tooltip="test" /> seems not working, why?
I import react-tooltip on my App.js.
Also App.js got the: <ReactTooltip place="bottom" effect="solid" />
My component Help (that one that not work tooltip) is the following:
const tooltip = this.props.tooltip || "Tooltip";
<div className="Help" data-tip={tooltip}> {children} </Help>
But the Help component is inside a request on other pages and It can take some seconds to spawn. Why is not working? The others tooltips works fine.
Thanks.
EDIT: I tested ReactToolTip.rebuild but doesn't work either.
EDIT2: I use StoryBook to make the documention and the component Help works nice with the tooltip there. Why doesn't work on my other pages? :/
I fixed it by adding the Import from ReactTooltip on each page and using the Rebuild option after the request complete.
ReactTooltip.rebuild();
Most helpful comment
I fixed it by adding the Import from ReactTooltip on each page and using the Rebuild option after the request complete.
ReactTooltip.rebuild();