<?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: prajin10</title>
    <description>The latest articles on DEV Community by prajin10 (@prajin10).</description>
    <link>https://dev.to/prajin10</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%2F895066%2F8906258a-e1c3-45ab-8b6e-3536816e7c5c.png</url>
      <title>DEV Community: prajin10</title>
      <link>https://dev.to/prajin10</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prajin10"/>
    <language>en</language>
    <item>
      <title>Fix gradle build failed with unknown error. see logs for the run gradlew in expo</title>
      <dc:creator>prajin10</dc:creator>
      <pubDate>Tue, 25 Feb 2025 18:00:00 +0000</pubDate>
      <link>https://dev.to/prajin10/fix-gradle-build-failed-with-unknown-error-see-logs-for-the-run-gradlew-in-expo-3f0h</link>
      <guid>https://dev.to/prajin10/fix-gradle-build-failed-with-unknown-error-see-logs-for-the-run-gradlew-in-expo-3f0h</guid>
      <description>&lt;p&gt;This is common issue among react native developer . &lt;br&gt;
Reasons of this &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Node Package mismatch (95% of the time )&lt;/li&gt;
&lt;li&gt;.gitignore file not available&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;SOlution&lt;br&gt;
1.Delete node_modules , Delete package_lock.json and then do npm install on fresh package.json ( THis will fix your problem most of the time)&lt;/p&gt;

&lt;p&gt;If the issue is not fixed &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create new project&lt;/li&gt;
&lt;li&gt;Add dependencies(only) from your package.json and then do npm install &lt;/li&gt;
&lt;li&gt;Run the app &lt;/li&gt;
&lt;li&gt;&lt;p&gt;Try building again this will work for most of cases&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;for git error just initialize git using  &lt;code&gt;"git init"&lt;/code&gt;  &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>gradle</category>
      <category>reactnative</category>
      <category>help</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to give same sizes to dynamic image in next js .</title>
      <dc:creator>prajin10</dc:creator>
      <pubDate>Mon, 22 May 2023 09:12:06 +0000</pubDate>
      <link>https://dev.to/prajin10/how-to-give-same-sizes-to-dynamic-image-in-next-js--d5a</link>
      <guid>https://dev.to/prajin10/how-to-give-same-sizes-to-dynamic-image-in-next-js--d5a</guid>
      <description>&lt;p&gt;In next js using  Image tag can be consfusing most of time because u have to either use width and height or layout="fill" compulsory so in those case making the dynamic image of same size can be quite confusing so here i am with my solution&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;Image src={bookInfo?.Cover?.url} alt="book" width={39.26} height={57.06}  /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Above code will  give size(39.26px * 57.06px ) to image.But wait  using only this may cause the image to be blurry / low quality  so in that case u must  have to  following code  &lt;/p&gt;

&lt;p&gt;&lt;code&gt;sizes="100vw"&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Which will make the image clear and of perfect size . &lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to import svg in next js and use it in src of Image tag from next/Image</title>
      <dc:creator>prajin10</dc:creator>
      <pubDate>Sat, 13 May 2023 03:12:49 +0000</pubDate>
      <link>https://dev.to/prajin10/how-to-import-svg-in-next-js-and-use-it-in-src-of-image-tag-from-nextimage-3c37</link>
      <guid>https://dev.to/prajin10/how-to-import-svg-in-next-js-and-use-it-in-src-of-image-tag-from-nextimage-3c37</guid>
      <description>&lt;p&gt;So due to 100 of different way to import Image in Nextjs it is sometimes really confusing  how to import svg in next js and use it in src of Image tag from next/Image. So here i am with just 4 steps &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Paste the svg file in you asset folder as icon.svg.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then in the file where you wan to use the svg import svg like below:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import icon from "../asset/icon.svg"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Then to use the icon in Image tag as source do like below&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;U dont need to define width and height.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's it if you like dont forget to comment and cheer me up&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Difference between onClick and onMouseDown with real world project example</title>
      <dc:creator>prajin10</dc:creator>
      <pubDate>Sat, 13 May 2023 03:04:23 +0000</pubDate>
      <link>https://dev.to/prajin10/difference-between-onclick-and-onmousedown-with-real-world-project-example-15bp</link>
      <guid>https://dev.to/prajin10/difference-between-onclick-and-onmousedown-with-real-world-project-example-15bp</guid>
      <description>&lt;p&gt;What exactly is the difference between. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;onMouseDown: A MouseEvent handler function. Fires when the pointer is pressed down.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;2.onClick: A MouseEvent handler function. Fires when the primary button was clicked on the pointing device.&lt;/p&gt;

&lt;p&gt;Now lets just move to its  practical useCase.&lt;/p&gt;

&lt;p&gt;So basically there was a input placeholder and i had to add the ❌ icon inside placeholder  which would clear the input if there was any value typed in the input placeholder and the ❌ icon should only be shown if the input is focused (onFocus) and icon should be hidden if focus is removed from input box (onFocusOut) .  I made this functionality by adding onFocus and onFocusOut to my input and  added onClick event to my cross icon to  clear the value . &lt;/p&gt;

&lt;p&gt;But the problem that was occuring was when i did onFocus and  typed something the ❌ icon was appearing but when i clicked on that ❌ icon  instead of triggering functionality of on Click  onFocusOut was triggered.  So i got to know about onMouseDown and i had to do e.preventDefault which solved my problem. &lt;/p&gt;

&lt;p&gt;Hope you understand the useCase and if u want to see the exact implementation in code i will show u just comment in this post.&lt;/p&gt;

&lt;p&gt;Happy coding.&lt;/p&gt;

&lt;p&gt;Note: In react/next onFocus and onBlur is used as replacement of onFocus and onFocusOut&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
