<?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: Nitin Sahu</title>
    <description>The latest articles on DEV Community by Nitin Sahu (@sudonitin).</description>
    <link>https://dev.to/sudonitin</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%2F240856%2Fad29fe36-106f-4ff1-a1b1-a3d5e1723fa7.jpeg</url>
      <title>DEV Community: Nitin Sahu</title>
      <link>https://dev.to/sudonitin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sudonitin"/>
    <language>en</language>
    <item>
      <title>Queues in Node js</title>
      <dc:creator>Nitin Sahu</dc:creator>
      <pubDate>Tue, 01 Feb 2022 16:12:05 +0000</pubDate>
      <link>https://dev.to/sudonitin/queues-in-node-js-4359</link>
      <guid>https://dev.to/sudonitin/queues-in-node-js-4359</guid>
      <description>&lt;p&gt;Have you been using node js for a while now? Are you aware of how things work internally in node js? the queues in node js? Doesn’t matter if your answer is yes or no, I will let you in on one little secret which will clear all your doubts regarding how node js works asynchronously under the hood.&lt;/p&gt;

&lt;p&gt;Let’s test your knowledge on node js. If you understand the queues in node js, you would be able to solve the below question.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;console.log("1");&lt;br&gt;
setTimeout(() =&amp;gt; console.log("2"),0);&lt;br&gt;
var promise = new Promise(function(resolve, reject) {&lt;br&gt;
  resolve();&lt;br&gt;
});&lt;br&gt;
promise.then(function(resolve) {&lt;br&gt;
  console.log('3');&lt;br&gt;
})&lt;br&gt;
.then(function(resolve) {&lt;br&gt;
  console.log('4');&lt;br&gt;
});&lt;br&gt;
console.log("5");&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Like what you read?&lt;/p&gt;

&lt;p&gt;Read the full article on &lt;a href="//readosapien.com"&gt;readosapien.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://readosapien.com/queues-in-node-js/"&gt;Article link&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>interview</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Can we promote personal articles here?</title>
      <dc:creator>Nitin Sahu</dc:creator>
      <pubDate>Tue, 01 Feb 2022 05:56:26 +0000</pubDate>
      <link>https://dev.to/sudonitin/can-we-promote-personal-articles-here-3882</link>
      <guid>https://dev.to/sudonitin/can-we-promote-personal-articles-here-3882</guid>
      <description>&lt;p&gt;I've recently started my own blog &lt;a href="//readosapien.com"&gt;readosapien&lt;/a&gt; with many intentions such as monetizing, self-brand, etc. It's a tech niche blog where we write about programming articles (js, caching, etc), startup news, interview tips and gadgets.&lt;/p&gt;

&lt;p&gt;I've recently written some articles that could help fellow developers on this platform.&lt;/p&gt;

&lt;p&gt;Just wanted to check if it is possible to add introduction of my article and attach the complete article link it?&lt;/p&gt;

&lt;p&gt;Any help on this would be appreciated!&lt;/p&gt;

</description>
      <category>blog</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>help</category>
    </item>
    <item>
      <title>What is one thing in React that you discovered very late?</title>
      <dc:creator>Nitin Sahu</dc:creator>
      <pubDate>Sat, 01 May 2021 18:30:11 +0000</pubDate>
      <link>https://dev.to/sudonitin/what-is-one-thing-in-react-that-you-discovered-very-late-ebj</link>
      <guid>https://dev.to/sudonitin/what-is-one-thing-in-react-that-you-discovered-very-late-ebj</guid>
      <description>&lt;p&gt;Recently I discovered that in nested components, child components are the first to render. Here are some of my observations.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to test?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Just console something in componentDidMount or useEffect of each component&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How to revert this flow?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use componentWillMount and a react hook equivalent to componentWillMount&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why revert?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;There may be a case where some data from API is passed down as props to your child component.&lt;/li&gt;
&lt;li&gt;Due to the async nature, there won't be any data to render for the child and you might get the red flag.🛑&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What if I don't want to revert?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Using conditional rendering in such cases is the ideal solution
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function demo(props) {
    return (
      props.data ? &amp;lt;MyComponent /&amp;gt; : &amp;lt;LoadingAnimations /&amp;gt;
    )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do let me know about the basic discoveries you made. 👊&lt;/p&gt;

&lt;h3&gt;
  
  
  PS
&lt;/h3&gt;

&lt;p&gt;Please let me know if I've made any err in this post. 😅&lt;/p&gt;

</description>
      <category>react</category>
      <category>redux</category>
      <category>javascript</category>
      <category>firstpost</category>
    </item>
  </channel>
</rss>
