<?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>DEV Community: Anaturuchi</title>
    <description>The latest articles on DEV Community by Anaturuchi (@anatugreen).</description>
    <link>https://dev.to/anatugreen</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%2F784892%2F83c0f54b-6b41-44af-ba9e-c7e2ca287581.png</url>
      <title>DEV Community: Anaturuchi</title>
      <link>https://dev.to/anatugreen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anatugreen"/>
    <language>en</language>
    <item>
      <title>Answer: React Native - Tailwind CSS autocomplete in VSCode for twrnc package</title>
      <dc:creator>Anaturuchi</dc:creator>
      <pubDate>Thu, 06 Oct 2022 17:03:27 +0000</pubDate>
      <link>https://dev.to/anatugreen/answer-react-native-tailwind-css-autocomplete-in-vscode-for-twrnc-package-l7a</link>
      <guid>https://dev.to/anatugreen/answer-react-native-tailwind-css-autocomplete-in-vscode-for-twrnc-package-l7a</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;div class="ltag__stackexchange--header"&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7Gn-iPj_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
          &lt;a href="https://stackoverflow.com/questions/71681367/react-native-tailwind-css-autocomplete-in-vscode-for-twrnc-package/73977534#73977534" rel="noopener noreferrer"&gt;
            &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: React Native - Tailwind CSS autocomplete in VSCode for twrnc package
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Oct  6 '22&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/71681367/react-native-tailwind-css-autocomplete-in-vscode-for-twrnc-package/73977534#73977534" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y9mJpuJP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          0
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wif5Zq3z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;pre&gt;&lt;code&gt; - //Use TailwindCss in ReactNative
  - Install twrnc: npm install twrnc
  - import tw from "twrnc";
  - Be sure to install the TailWind CSS Intellisense extension in VS code 
  - Go to the extension settings and
  add 'style' in Class Attributes 
  - Go to your project root folder and
  manually&lt;/code&gt;&lt;/pre&gt;…
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    &lt;a href="https://stackoverflow.com/questions/71681367/react-native-tailwind-css-autocomplete-in-vscode-for-twrnc-package/73977534#73977534" class="ltag__stackexchange--btn" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>EASIEST way to copy text to clipboard when button is pressed - using JavaScript</title>
      <dc:creator>Anaturuchi</dc:creator>
      <pubDate>Fri, 27 May 2022 10:07:04 +0000</pubDate>
      <link>https://dev.to/anatugreen/easiest-way-to-copy-text-to-clipboard-when-button-is-pressed-using-javascript-55m7</link>
      <guid>https://dev.to/anatugreen/easiest-way-to-copy-text-to-clipboard-when-button-is-pressed-using-javascript-55m7</guid>
      <description>&lt;p&gt;This is by far the easier way I have seen to copy text to clipboard when a button is clicked. This is for Javascript devs.&lt;/p&gt;

&lt;p&gt;You can use this to create a Copy to Clipboard button on your javascript site or app.&lt;/p&gt;

&lt;p&gt;I believe in practical learning so let us just build something small that shows this in use.&lt;/p&gt;

&lt;p&gt;Let us create a very simple HTML document that where you can type a string as input and display the text in a paragraph by clicking a button. Then you will use another button to copy the paragraph to your computer's or phone's clipboard.&lt;/p&gt;

&lt;p&gt;We will not style this and our javascript will be on same file for simplicity and speed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;

&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;title&amp;gt;Copy To Clipboard&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
&amp;lt;h1&amp;gt;Simple example of copy text to clipboard using Javascript &amp;lt;/h1&amp;gt;
&amp;lt;input placeholder="Type text" id="textInput"&amp;gt;
&amp;lt;button&amp;gt;Save This&amp;lt;/button&amp;gt;
&amp;lt;p id="savedText"&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;button&amp;gt;Copy This&amp;lt;/button&amp;gt;

&amp;lt;script&amp;gt;
&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Intentionally left the Script tag empty. That is where our javascript will be written.&lt;/p&gt;

&lt;p&gt;We will now write the first Javascript code inside our script tag that will grab the text that is entered in the text input space (id ="textInput") and display it inside the paragraph with id "savedText" which is currently empty.&lt;/p&gt;

&lt;p&gt;Next, we will add an onClick function invocation to the "Save" button in our html.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;

&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;title&amp;gt;Copy To Clipboard&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
&amp;lt;h1&amp;gt;Simple example of copy text to clipboard using Javascript &amp;lt;/h1&amp;gt;
&amp;lt;input placeholder="Type text" id="textInput"&amp;gt;
&amp;lt;button onClick="saveText()" &amp;gt;Save This&amp;lt;/button&amp;gt;
&amp;lt;p id="savedText"&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;button&amp;gt;Copy This&amp;lt;/button&amp;gt;


&amp;lt;script&amp;gt;

function saveText(){
document.getElementById("savedText").innerText = document.getElementById("textInput").value
}
&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you run this on your browser now, you will see that when you make an input and click on the "Save" button, the text you typed will be displayed below the save button.&lt;/p&gt;

&lt;p&gt;The save button is calling a function "SaveText()". What this does is to take the value(ie, content) of the text input field and use it to replace whatever is in the inner text of the paragraph with id="savedText", whether an empty space or another text.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I know you may already know all these but I need to make it as simple as possible for even the absolute beginner😉.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Next, we create the function that actually does the copying to clipboard in Javascript. You can place this under the first function still inside your script tag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; const copyToClipboard = (text) =&amp;gt; {
            navigator.clipboard.writeText(text)
        }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note that we gave it the parameter "text". This will be replaced with a variable (an argument) whose value will be the text saved in our "savedText" paragraph.&lt;/p&gt;

&lt;p&gt;Next, Create a function that is called when the &lt;strong&gt;"Copy" button&lt;/strong&gt; is clicked. We name this function "copy". Write this under the previous function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; function copy() {
            const textToCopy = document.getElementById("savedText").innerText;
            copyToClipboard(textToCopy)
            console.log(textToCopy)
        }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Above: inside the function, we first created a variable named "textToCopy" and made it's value to be the text we grab from our "savedText" paragraph.&lt;br&gt;
Then we use "textToCopy" as an argument when we call our earlier function: *&lt;em&gt;copyToClipboard  *&lt;/em&gt;. If you are new to this, this is called calling a function inside another function.&lt;/p&gt;

&lt;p&gt;Finally, we go back to our "Copy this" button in the html and make it to call the copy() function whenever it is pressed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;button onClick="copy()"&amp;gt; Copy This &amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Putting it all together,&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;We will have this as our complete code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;

&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;title&amp;gt;Copy To Clipboard&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
    &amp;lt;h1&amp;gt;Simple example of copy text to clipboard using Javascript &amp;lt;/h1&amp;gt;
    &amp;lt;input placeholder="Type text" id="textInput"&amp;gt;
    &amp;lt;button onClick="saveText()"&amp;gt;Save This&amp;lt;/button&amp;gt;
    &amp;lt;p id="savedText"&amp;gt;&amp;lt;/p&amp;gt;
    &amp;lt;button onClick="copy()"&amp;gt; Copy This&amp;lt;/button&amp;gt;


    &amp;lt;script&amp;gt;

        function saveText() {
            document.getElementById("savedText").innerText = document.getElementById("textInput").value
        }

        const copyToClipboard = (text) =&amp;gt; {
            navigator.clipboard.writeText(text)
        }

        function copy() {
            const textToCopy = document.getElementById("savedText").innerText;
            copyToClipboard(textToCopy)
            alert("Text copied to clipboard")
        }

    &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope this helps someone out there. You can follow me on &lt;a href="http://twitter.com/anatugreen"&gt;Twitter &lt;/a&gt; or &lt;a href="https://www.buymeacoffee.com/greenbrain"&gt;BuyMeACoffee&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to change color of an icon, text or other component with ReactNative useState Hook</title>
      <dc:creator>Anaturuchi</dc:creator>
      <pubDate>Sat, 26 Mar 2022 01:20:19 +0000</pubDate>
      <link>https://dev.to/anatugreen/how-to-change-color-of-an-icon-text-or-other-component-with-reactnative-usestate-hook-1cfi</link>
      <guid>https://dev.to/anatugreen/how-to-change-color-of-an-icon-text-or-other-component-with-reactnative-usestate-hook-1cfi</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;h1&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7Gn-iPj_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
            &lt;a href="https://stackoverflow.com/questions/68467794/how-do-i-use-the-usestate-hook-to-change-the-color-of-my-react-icons-to-blue/71624613#71624613" rel="noopener noreferrer"&gt;
              &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: How do I use the useState hook to change the color of my react icons to blue?
            &lt;/a&gt;
        &lt;/h1&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Mar 26 '22&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/68467794/how-do-i-use-the-usestate-hook-to-change-the-color-of-my-react-icons-to-blue/71624613#71624613" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y9mJpuJP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          0
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wif5Zq3z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;Here is an example that can be helpful. In this case, I want to update the colour of my heart IonIcon when a user clicks on it once, so I first wrapped it in touchableOpacity to get that blink effect. If you don't want to wrap it, you simply put…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    
      &lt;a href="https://stackoverflow.com/questions/68467794/how-do-i-use-the-usestate-hook-to-change-the-color-of-my-react-icons-to-blue/71624613#71624613" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
    
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Answer: How To Pass Style Props into a reusable component in React Native for more flexible styling in the future</title>
      <dc:creator>Anaturuchi</dc:creator>
      <pubDate>Tue, 22 Mar 2022 18:13:40 +0000</pubDate>
      <link>https://dev.to/anatugreen/answer-how-to-pass-style-props-into-a-reusable-component-in-react-native-for-more-flexible-styling-in-the-future-41mp</link>
      <guid>https://dev.to/anatugreen/answer-how-to-pass-style-props-into-a-reusable-component-in-react-native-for-more-flexible-styling-in-the-future-41mp</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;h1&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7Gn-iPj_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
            &lt;a href="https://stackoverflow.com/questions/71568868/how-to-pass-style-props-into-a-reusable-component-in-react-native-for-more-flexi/71568869#71568869" rel="noopener noreferrer"&gt;
              &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: How To Pass Style Props into a reusable component in React Native for more flexible styling in the future
            &lt;/a&gt;
        &lt;/h1&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Mar 22 '22&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/71568868/how-to-pass-style-props-into-a-reusable-component-in-react-native-for-more-flexi/71568869#71568869" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y9mJpuJP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          1
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wif5Zq3z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;The Goal
To create a reusable react component and have the flexibility to style any part of the component in the future.&lt;/p&gt;
&lt;p&gt;How to achieve this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create the reusable component using const or function.&lt;/li&gt;
&lt;li&gt;Pass 'props' as a parameter to the component, whether functional or const.&lt;/li&gt;
&lt;li&gt;Give the components of…&lt;/li&gt;
&lt;/ol&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    
      &lt;a href="https://stackoverflow.com/questions/71568868/how-to-pass-style-props-into-a-reusable-component-in-react-native-for-more-flexi/71568869#71568869" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
    
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>javascript</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>reactnative</category>
    </item>
    <item>
      <title>Answer: React Native backgroundColor overlay over image. How To Make a Colour Overlay on an Image in react native</title>
      <dc:creator>Anaturuchi</dc:creator>
      <pubDate>Tue, 11 Jan 2022 16:51:19 +0000</pubDate>
      <link>https://dev.to/anatugreen/answer-react-native-backgroundcolor-overlay-over-image-how-to-make-a-colour-overlay-on-an-image-in-react-native-19e6</link>
      <guid>https://dev.to/anatugreen/answer-react-native-backgroundcolor-overlay-over-image-how-to-make-a-colour-overlay-on-an-image-in-react-native-19e6</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;div class="ltag__stackexchange--header"&gt;
          &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fstackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
          &lt;a href="https://stackoverflow.com/questions/41626402/react-native-backgroundcolor-overlay-over-image/70670373#70670373" rel="noopener noreferrer"&gt;
            &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: React Native backgroundColor overlay over image
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Jan 11 '22&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/41626402/react-native-backgroundcolor-overlay-over-image/70670373#70670373" rel="noopener noreferrer"&gt;
        &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fstackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          5
        &lt;/div&gt;
        &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fstackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;&lt;a href="https://i.sstatic.net/8CFyt.png" rel="noreferrer noopener"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.sstatic.net%2F8CFyt.png" alt="enter image description here"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Make an overlay on react native image background: If you want to make an overlay on the background image ONLY in react native and not affect other elements that are inside the &amp;lt; ImageBackground&amp;gt; tag, do this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;//Fetching the background image from online, you can use any image source of&lt;/code&gt;&lt;/pre&gt;…
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    &lt;a href="https://stackoverflow.com/questions/41626402/react-native-backgroundcolor-overlay-over-image/70670373#70670373" class="ltag__stackexchange--btn" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Make an overlay on react native image background: If you want to make an overlay on the background image ONLY in react native and not affect other elements that are inside the &amp;lt; ImageBackground&amp;gt; tag, do this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

//Fetching the background image from online, you can use any image source of your choice.

const GoProImageBackGd = { uri: "https://images.pexels.com/photos/2462402/pexels-photo-2462402.jpeg?auto=compress&amp;amp;cs=tinysrgb&amp;amp;dpr=2&amp;amp;h=650&amp;amp;w=940" };

// Setting the background image for the view:

 &amp;lt;View style={styles.GoProBox}&amp;gt;
            &amp;lt;ImageBackground source={GoProImageBackGd} resizeMode='cover' style={styles.goProBgImage}&amp;gt;
            &amp;lt;View style={styles.overlayView}/&amp;gt;
            &amp;lt;Text style={styles.goProText}&amp;gt; Want to join the hot section? Go hot with Pro!&amp;lt;/Text&amp;gt;
            &amp;lt;GoProButton /&amp;gt;
            &amp;lt;/ImageBackground&amp;gt;


//Stylesheet

const styles = StyleSheet.create({
GoProBox: {
        width: '95%',
        height: 200,
        margin: 5,
        backgroundColor: '#00cc00',
        borderRadius: 10,
        alignSelf: 'center',
        overflow: 'hidden'

    },
goProBgImage: {
        width: '100%', height: '100%',


    },

    goProText: {
        textAlign: 'center',
        fontSize: 20,
        marginTop: 10,
        fontWeight: 'bold',
        padding: 10,
        color: 'white'

    },
GoProButton: {
        height: 60,
        width: 200,
        backgroundColor: 'red',
        borderRadius: 15,
        alignSelf: 'center',
        justifyContent: 'center',
        top: 50
    },
overlayView: {
        height: "100%",
        width: "100%",
        position: 'absolute',
        backgroundColor: 'rgba(0, 204, 0, 0.5)',

    }

})


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>reactnative</category>
      <category>mobileappdev</category>
      <category>reactnativetutorial</category>
      <category>reactnativelearning</category>
    </item>
  </channel>
</rss>
