<?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: Sagar Gnawali</title>
    <description>The latest articles on DEV Community by Sagar Gnawali (@sagargnawali).</description>
    <link>https://dev.to/sagargnawali</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%2F462573%2Fd49f365d-70dd-4f22-92e5-60da5782d7ef.jpeg</url>
      <title>DEV Community: Sagar Gnawali</title>
      <link>https://dev.to/sagargnawali</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sagargnawali"/>
    <language>en</language>
    <item>
      <title>All about typeof</title>
      <dc:creator>Sagar Gnawali</dc:creator>
      <pubDate>Sun, 17 Jul 2022 10:25:11 +0000</pubDate>
      <link>https://dev.to/sagargnawali/all-about-typeof-3oe9</link>
      <guid>https://dev.to/sagargnawali/all-about-typeof-3oe9</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EWecWSJQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nttl5zfnzbw8mhdept4j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EWecWSJQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nttl5zfnzbw8mhdept4j.png" alt="Image description" width="880" height="926"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to Highlight potential problems in React application?</title>
      <dc:creator>Sagar Gnawali</dc:creator>
      <pubDate>Sat, 30 Apr 2022 05:48:39 +0000</pubDate>
      <link>https://dev.to/sagargnawali/how-to-highlight-potential-problems-in-react-application-2fg</link>
      <guid>https://dev.to/sagargnawali/how-to-highlight-potential-problems-in-react-application-2fg</guid>
      <description>&lt;p&gt;StrictMode&lt;br&gt;
-&amp;gt; Identifying components with unsafe lifecycles &lt;br&gt;
-&amp;gt; Warning about legacy string ref API usage &lt;br&gt;
-&amp;gt; Warning about deprecated findDOMNode usage&lt;br&gt;
-&amp;gt; Detecting unexpected side effects &lt;br&gt;
-&amp;gt; Detecting legacy context API&lt;br&gt;
-&amp;gt; Detecting unsafe effects &lt;/p&gt;

&lt;p&gt;Strict mode checks are run in development mode only; they do not impact the production build.&lt;br&gt;
For More: &lt;a href="https://reactjs.org/docs/strict-mode.html"&gt;https://reactjs.org/docs/strict-mode.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>Got some Javascript project</title>
      <dc:creator>Sagar Gnawali</dc:creator>
      <pubDate>Mon, 11 Jan 2021 17:03:01 +0000</pubDate>
      <link>https://dev.to/sagargnawali/got-some-javascript-project-fm0</link>
      <guid>https://dev.to/sagargnawali/got-some-javascript-project-fm0</guid>
      <description>&lt;p&gt;&lt;a href="https://javascript30.com/?ref=java5cript.com"&gt;https://javascript30.com/?ref=java5cript.com&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Day 6 -&gt; 40 days of code</title>
      <dc:creator>Sagar Gnawali</dc:creator>
      <pubDate>Wed, 25 Nov 2020 16:50:46 +0000</pubDate>
      <link>https://dev.to/sagargnawali/day-6-40-days-of-code-497c</link>
      <guid>https://dev.to/sagargnawali/day-6-40-days-of-code-497c</guid>
      <description>&lt;p&gt;Nothing&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Day 5 -&gt; 40 days of code.</title>
      <dc:creator>Sagar Gnawali</dc:creator>
      <pubDate>Tue, 24 Nov 2020 15:44:13 +0000</pubDate>
      <link>https://dev.to/sagargnawali/day-5-40-days-of-code-2kp3</link>
      <guid>https://dev.to/sagargnawali/day-5-40-days-of-code-2kp3</guid>
      <description>&lt;p&gt;If we defined any variable and don't assign any value to it and if console.log() it then it will show undefined this happened with only var and let keyword.&lt;/p&gt;

&lt;p&gt;In JavaScript hoisting is the default behavior of moving all the declaration at the top of the scope before code execution.&lt;br&gt;
Hoisting is only happen with var.&lt;br&gt;
To avoid hoisting always define a variable at the top of the program.&lt;/p&gt;

&lt;p&gt;Let's see what does it means in coding part.&lt;br&gt;
eg. &lt;br&gt;
console.log(x);//undefined&lt;br&gt;
var x;&lt;/p&gt;

&lt;p&gt;eg.&lt;br&gt;
var a=10;&lt;br&gt;
const print =()=&amp;gt;&lt;br&gt;
{&lt;br&gt;
console.log(a);//undefined&lt;br&gt;
var a;&lt;br&gt;
}&lt;br&gt;
print();&lt;/p&gt;

&lt;p&gt;Here we see that a prints undefined because of hoisting.&lt;br&gt;
If we remove the var a from the print function then it will print a as 10.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Day 4 -&gt; 40 days of code.</title>
      <dc:creator>Sagar Gnawali</dc:creator>
      <pubDate>Mon, 23 Nov 2020 17:56:48 +0000</pubDate>
      <link>https://dev.to/sagargnawali/day-4-40-days-of-code-4ecj</link>
      <guid>https://dev.to/sagargnawali/day-4-40-days-of-code-4ecj</guid>
      <description>&lt;p&gt;Arrow function &lt;br&gt;
It's the shortest function which we can use in the JavaScript.&lt;br&gt;
It's just simple like other function the only difference is it use =&amp;gt; that's why we think it's complicated. In real it's the simplest way to declare a function in JavaScript.&lt;br&gt;
Let's see what does it mean&lt;br&gt;
Normal function.&lt;br&gt;
eg. &lt;br&gt;
function printdata(x)&lt;br&gt;
{&lt;br&gt;
 console.log(x);&lt;br&gt;
}&lt;br&gt;
printdata('normal function');&lt;/p&gt;

&lt;p&gt;On the other hand if we use arrow function it's looks like this&lt;br&gt;
eg. &lt;br&gt;
const printdata = (x)=&amp;gt;&lt;br&gt;
{ &lt;br&gt;
console.log(x);&lt;br&gt;
}&lt;br&gt;
printdata('arrow function');&lt;/p&gt;

&lt;p&gt;Just do some task using arrow function like factorial of a number , basic calculation by passing parameters eg. Adding, multiplication. Then you will get to know more about this function.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Day 3 -&gt; 40 days of code.</title>
      <dc:creator>Sagar Gnawali</dc:creator>
      <pubDate>Sun, 22 Nov 2020 15:49:40 +0000</pubDate>
      <link>https://dev.to/sagargnawali/day-3-40-days-of-code-1e08</link>
      <guid>https://dev.to/sagargnawali/day-3-40-days-of-code-1e08</guid>
      <description>&lt;p&gt;Anonymous function&lt;br&gt;
In general we can say that the function which haven't any name are known as anonymous function.&lt;br&gt;
Let's see what does it mean&lt;br&gt;
General function have their function name &lt;br&gt;
eg. &lt;br&gt;
function printdata ()&lt;br&gt;
{&lt;br&gt;
console.log('general function');&lt;br&gt;
}&lt;br&gt;
printdata();&lt;/p&gt;

&lt;p&gt;On The other hand we have anonymous function which haven't any name.In JavaScript we store function in some variable name which is known as anonymous function.&lt;br&gt;
eg.&lt;br&gt;
const printdata = function()&lt;br&gt;
{&lt;br&gt;
console.log('Anonymous function');&lt;br&gt;
}&lt;br&gt;
printdata();&lt;/p&gt;

&lt;p&gt;Usage:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Anonymous function are passed as an argument to other function.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And if you have unconventional output don't be afraid of it.&lt;br&gt;
This is the first step to learn something new.&lt;br&gt;
Sometimes unconventional code/output brings great idea to solve bugs.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Day 2 -&gt; 40 days of code</title>
      <dc:creator>Sagar Gnawali</dc:creator>
      <pubDate>Sat, 21 Nov 2020 16:06:08 +0000</pubDate>
      <link>https://dev.to/sagargnawali/day-2-40-days-of-code-1lk9</link>
      <guid>https://dev.to/sagargnawali/day-2-40-days-of-code-1lk9</guid>
      <description>&lt;p&gt;Portals provide a first-class way to render children into a DOM node that exists outside the DOM &lt;br&gt;
Hierarchy of the parent component.&lt;br&gt;
A React portals provides a way to render an element outside of its component hierarchy ie in a separate component.&lt;/p&gt;

&lt;p&gt;Syntax: ReactDOM.createPortal(child,container)&lt;/p&gt;

&lt;p&gt;Usage:&lt;br&gt;
-&amp;gt;floating menus &lt;br&gt;
-&amp;gt;widgets &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Day 1 -&gt; 40 days of code.</title>
      <dc:creator>Sagar Gnawali</dc:creator>
      <pubDate>Fri, 20 Nov 2020 18:59:14 +0000</pubDate>
      <link>https://dev.to/sagargnawali/40-days-of-code-55b1</link>
      <guid>https://dev.to/sagargnawali/40-days-of-code-55b1</guid>
      <description>&lt;p&gt;shallow comparison operator.&lt;br&gt;
When it comes to string  a(sc)b returns true and in case of array and object it returns false.&lt;br&gt;
ie for primitive data types a(sc)b true and for complex data types a(sc)b false.&lt;/p&gt;

&lt;p&gt;Let's check&lt;br&gt;
var a="data";&lt;br&gt;
var b="data";&lt;br&gt;
var a=c;&lt;br&gt;
console.log(a===b,a===c);//true,true&lt;/p&gt;

&lt;p&gt;var a=[1,2,3];&lt;br&gt;
var b=[1,2,3];&lt;br&gt;
var a=c;&lt;br&gt;
console.log(a===b,a===c);//false,true&lt;/p&gt;

&lt;h1&gt;
  
  
  javascript #code
&lt;/h1&gt;

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