<?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: Open Source Code</title>
    <description>The latest articles on DEV Community by Open Source Code (@_opensourcecode).</description>
    <link>https://dev.to/_opensourcecode</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%2F452998%2Ff8b294a6-8d48-4ea6-97a3-954986411431.png</url>
      <title>DEV Community: Open Source Code</title>
      <link>https://dev.to/_opensourcecode</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/_opensourcecode"/>
    <language>en</language>
    <item>
      <title>React rendering basics</title>
      <dc:creator>Open Source Code</dc:creator>
      <pubDate>Tue, 06 Oct 2020 08:40:11 +0000</pubDate>
      <link>https://dev.to/_opensourcecode/react-rendering-optimization-34ok</link>
      <guid>https://dev.to/_opensourcecode/react-rendering-optimization-34ok</guid>
      <description>&lt;p&gt;Rendering introduction&lt;/p&gt;

&lt;p&gt;Rendering is the process during which React moves down the component tree starting at the root, looking for all the components flagged for update, asking them to describe their desired UI structure based on the current combination of props and state. For each flagged component, React will call its render() method (for class components) or FunctionComponent() (for function components), and save the output produced after converting the JSX result into a plain JS object, using React.createElement().&lt;/p&gt;

&lt;p&gt;After collecting the render output from the entire component tree, React will diff the new tree (the virtual DOM) with the current DOM tree and collect the list of changes that need to be made to the DOM to produce the desired UI structure. After this process, known as reconciliation, React applies all the calculated changes to the DOM.&lt;br&gt;
Render and commit phases&lt;/p&gt;

&lt;p&gt;Conceptually, this work is divided into two phases:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Render phase: rendering components, calculating changes
Commit phase: applying the changes to the DOM
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;After the commit phase is complete, React will run componentDidMount and componentDidUpdate lifecycle methods, as well as useLayoutEffect and, after a short timeout, useEffect hooks.&lt;/p&gt;

&lt;p&gt;Two key takeaways here are the following:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Rendering is not the same as updating the DOM
A component may be rendered without any visible changes
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Rendering reasons&lt;/p&gt;

&lt;p&gt;After the initial render has completed, there are a few different things that will cause a re-render:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;this.setState() (class components)
this.forceUpdate() (class components)
useState() setters (function components)
useReducer() dispatches (function components)
ReactDOM.render() again (on the root component)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Rendering behavior&lt;/p&gt;

&lt;p&gt;React's default behavior is to recursively render all child components inside of it when a parent component is rendered. This means that it does not care if a component's props have changed - as long as the parent component rendered, its children will render unconditionally.&lt;/p&gt;

&lt;p&gt;To put this another way, calling setState() in the root component without any other changes, will cause React to re-render every single component in the component tree. Most likely, most of the components will return the exact same render output as the last render, meaning React will not have to make any changes to the DOM, but the rendering and diffing calculations will be performed regardless, taking time and effort.&lt;/p&gt;

</description>
      <category>react</category>
      <category>hooks</category>
      <category>program</category>
    </item>
    <item>
      <title>#30daysofgooglecloud</title>
      <dc:creator>Open Source Code</dc:creator>
      <pubDate>Wed, 30 Sep 2020 06:48:11 +0000</pubDate>
      <link>https://dev.to/_opensourcecode/30daysofgooglecloud-68b</link>
      <guid>https://dev.to/_opensourcecode/30daysofgooglecloud-68b</guid>
      <description>&lt;h1&gt;
  
  
  30daysofgooglecloud program starting 1st October
&lt;/h1&gt;

&lt;p&gt;The 30 Days of Google Cloud program will help you provide an opportunity to #kickstart your learning on cloud technology using practice on Google Cloud.&lt;/p&gt;

&lt;p&gt;Enroll Now : &lt;a href="https://lnkd.in/gHgHZYs"&gt;https://lnkd.in/gHgHZYs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;More Info : &lt;a href="https://lnkd.in/gnRD9Kb"&gt;https://lnkd.in/gnRD9Kb&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Discord : &lt;a href="https://discord.gg/E77WSfw"&gt;https://discord.gg/E77WSfw&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let Start 30 Days Google Cloud Program&lt;/p&gt;

&lt;p&gt;Note: The deadline to submit this enrolment is 30th September 7 PM IST&lt;/p&gt;

&lt;h1&gt;
  
  
  30DaysofGoogleCloud #gcpcloud # #qwiklabs #cloudcomputing #google #cloud
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>HACKTOBERFEST2020</title>
      <dc:creator>Open Source Code</dc:creator>
      <pubDate>Wed, 30 Sep 2020 06:46:41 +0000</pubDate>
      <link>https://dev.to/_opensourcecode/hacktoberfest2020-1c3d</link>
      <guid>https://dev.to/_opensourcecode/hacktoberfest2020-1c3d</guid>
      <description>&lt;p&gt;HACKTOBERFEST2020&lt;/p&gt;

&lt;p&gt;Support open source and pick a limited edition T-shirt or plant a tree.&lt;br&gt;
Registration for Hacktoberfest is open starting today.&lt;br&gt;
Make your first Pull Request and earn a free tee from GitHub!&lt;br&gt;
This project is perfect for your first pull request&lt;/p&gt;

&lt;p&gt;Hacktoberfest 2020 : &lt;a href="https://lnkd.in/eFSCd7j"&gt;https://lnkd.in/eFSCd7j&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hacktoberfest PR 2020 : &lt;a href="https://lnkd.in/e5-phAd"&gt;https://lnkd.in/e5-phAd&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;#hacktoberfest, #hacktoberfest2020 #GitHub #opensource&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Hacktoberfest 2020 - Open Source Code </title>
      <dc:creator>Open Source Code</dc:creator>
      <pubDate>Thu, 27 Aug 2020 10:42:12 +0000</pubDate>
      <link>https://dev.to/_opensourcecode/hacktoberfest-2020-open-source-code-982</link>
      <guid>https://dev.to/_opensourcecode/hacktoberfest-2020-open-source-code-982</guid>
      <description>&lt;p&gt;Hello Developers!&lt;/p&gt;

&lt;p&gt;Every year in October, DigitalOcean and GitHub team up for an online event which celebrates open-source. Open-Source is one of the most growing areas in development these years. Also, it has made possible for beginners to grow and develop their skills as a programmer/developer. On a brighter side, you get some really cool freebies as well!&lt;/p&gt;

&lt;p&gt;The Open Source Code Hacktoberfest challenge.&lt;br&gt;
We’ve got our own challenge for Hacktoberfest 2020 :&lt;/p&gt;

&lt;p&gt;1 : You can open a PR on Hacktoberfest2020 Repo . (PRs to README files will not be counted for this challenge )&lt;/p&gt;

&lt;p&gt;2 : If the PR you submit for any of the issues gets merged, you’ll get the participant e-certificate by Open Source Code .&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Join our Discord Channel : &lt;a href="https://discord.gg/nyW8697"&gt;https://discord.gg/nyW8697&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Github : &lt;a href="https://lnkd.in/eFSCd7j"&gt;https://lnkd.in/eFSCd7j&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Live PR Merge : &lt;a href="https://lnkd.in/ezeKHUr"&gt;https://lnkd.in/ezeKHUr&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;#hacktoberfest #hacktoberfest2020 #opensource #opensourcecode #osc #github #pullrequest #merge #git #contribute #digitalocean #devcommunity&lt;/p&gt;

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