title: Compare text and highlight differences in react-native
body: <p>Today i want to create a app in react-native that compare two string for first time it will be simple . For example</p>
  <pre><code>var str1 = &quot;Hello there&quot;;
  var str2 = &quot;Hello&quot;;
  </code></pre>
  <p>I want to highlight a word that is different from the other text. And in example it is there. Something like online compare tools. So it will looks like
  <a href="https://i.stack.imgur.com/mCnhO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mCnhO.png" alt="enter image description here" /></a></p>
  <p>&quot;There&quot; word is with different background !</p>
  <p>So i have no idea how to start. I tried with this code</p>
  <pre><code>const CustomText = (props) =&gt; {
      const text1 = props.str1.split(' ');
      const text2 = props.str2.split(' ');
      return &lt;Text&gt;{text1.map(text =&gt; {
        if (!text.includes(// here i should compare with other text)) {
          return &lt;Text style={{ color: 'blue' }}&gt;{text} &lt;/Text&gt;;
        }
        return `${text} `;
      })}&lt;/Text&gt;;
  }
  </code></pre>
  <p>I dont knwo how to map this two string to compare each other . Thanks for helping ...</p>