I have following the code example regarding tooltips in Reactstrap:
constructor(props) {
super(props);
this.state = {
tooltipOpen: true
};
}
.
.
.
render() {
return (
<div>
<p>Somewhere in here is a <a href="#" id="TooltipExample">tooltip</a>.</p>
<Tooltip
placement="right"
isOpen={this.state.tooltipOpen}
target="TooltipExample"
toggle={this.toggle}>
Hello world!
</Tooltip>
</div>
)
}
And I'm getting the following error:
Error: The target 'TooltipExample' could not be identified in the dom, tip: check spelling
Everything works ok if the initial state is tooltipOpen: false
. But I would like the tooltip to appear when the user loads the page...
What should I do?