<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: alexie666</title>
    <description>The latest articles on Forem by alexie666 (@alexie666).</description>
    <link>https://forem.com/alexie666</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F372398%2Fcd6f81db-1472-44b2-ba00-79ef56a4e3eb.png</url>
      <title>Forem: alexie666</title>
      <link>https://forem.com/alexie666</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/alexie666"/>
    <language>en</language>
    <item>
      <title>Tooltips not showing in my react app</title>
      <dc:creator>alexie666</dc:creator>
      <pubDate>Thu, 23 Apr 2020 16:02:06 +0000</pubDate>
      <link>https://forem.com/alexie666/tooltips-not-showing-in-my-react-app-13h9</link>
      <guid>https://forem.com/alexie666/tooltips-not-showing-in-my-react-app-13h9</guid>
      <description>&lt;p&gt;I have put tooltips in my react app but not a single one of them showing. why is this? where is the fault lies? I 'll post the code here.&lt;/p&gt;

&lt;p&gt;TooltipSpan.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';
import { OverlayTrigger } from 'react-bootstrap';

const TooltipSpan = (props) =&amp;gt; {
  const { tooltip, className } = props;

  return (
    &amp;lt;OverlayTrigger placement="top" overlay={tooltip}&amp;gt;
      &amp;lt;span className={className} /&amp;gt;
    &amp;lt;/OverlayTrigger&amp;gt;
  );
};
export default TooltipSpan;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;importing this to the below file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Like.js
import React, { Component } from 'react';
import { OverlayTrigger, Tooltip } from 'react-bootstrap';
import TooltipSpan from './TooltipSpan.js';

class Like extends Component {

  handleAddition = () =&amp;gt; {
    this.props.onAddition();
  }

  handleDelete = () =&amp;gt; {
    this.props.onDelete();
  }

  render() {
    const { isLiked, canLike, isBlocked, isReported } = this.props;
    const tooltipCannotLike = (
      &amp;lt;Tooltip id="cannot-like"&amp;gt;You can not like a profile without a profile picture !&amp;lt;/Tooltip&amp;gt;
    );
    const tooltipLike = (
      &amp;lt;Tooltip id="like"&amp;gt;Like this profile to be able to talk to him. He also like you !&amp;lt;/Tooltip&amp;gt;
    );

    if (isBlocked || isReported) {
      return &amp;lt;span className="fa fa-star cannot-like" /&amp;gt;;
    }
    if (!canLike) {
      return &amp;lt;TooltipSpan className="fa fa-star cannot-like" tooltip={tooltipCannotLike} /&amp;gt;;
    }
    if (isLiked) {
      return &amp;lt;button className="fa fa-star liked" onClick={this.handleDelete} /&amp;gt;;
    }
    return (
      &amp;lt;OverlayTrigger placement="bottom" overlay={tooltipLike}&amp;gt;
        &amp;lt;span&amp;gt;
          &amp;lt;button
            className="fa fa-star-o"
            onClick={this.handleAddition}
          /&amp;gt;
        &amp;lt;/span&amp;gt;
      &amp;lt;/OverlayTrigger&amp;gt;
    );
  }
}
export default Like;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Like.js is one file. I have a block and report js files, and not a single tooltips working in those files too. I have one question. Does the building the app fix the issues like this? I haven't yet built this app.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>reactnative</category>
    </item>
  </channel>
</rss>
