<?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: sajedsoliman</title>
    <description>The latest articles on DEV Community by sajedsoliman (@sajedsoliman).</description>
    <link>https://dev.to/sajedsoliman</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%2F582265%2F7f359042-c03b-4436-9927-df99e2562041.jpg</url>
      <title>DEV Community: sajedsoliman</title>
      <link>https://dev.to/sajedsoliman</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sajedsoliman"/>
    <language>en</language>
    <item>
      <title>What is Babel used for?</title>
      <dc:creator>sajedsoliman</dc:creator>
      <pubDate>Thu, 19 Aug 2021 12:49:46 +0000</pubDate>
      <link>https://dev.to/sajedsoliman/what-is-babel-used-for-p3h</link>
      <guid>https://dev.to/sajedsoliman/what-is-babel-used-for-p3h</guid>
      <description>&lt;p&gt;Well, before we start talking about what &lt;strong&gt;Babel&lt;/strong&gt; does, we need to figure out what the problem it solved. We know that Web Browsers have &lt;strong&gt;JS&lt;/strong&gt; &lt;em&gt;engines&lt;/em&gt; in them, and these &lt;em&gt;engines&lt;/em&gt; are responsible for reading our &lt;strong&gt;JS&lt;/strong&gt; code to make our apps functional.&lt;/p&gt;

&lt;p&gt;But these &lt;em&gt;engines&lt;/em&gt; understand only specific versions of &lt;strong&gt;JS&lt;/strong&gt; and unfortunately, &lt;strong&gt;ES6&lt;/strong&gt; is not one of them. I think it is now clear what &lt;strong&gt;Babel&lt;/strong&gt; came for, wait not? Ok, &lt;strong&gt;Babel&lt;/strong&gt; takes new modern JS that is not supported or understandable by browsers and compile it into old versions of &lt;strong&gt;JS&lt;/strong&gt; that are supported and understandable by browsers.&lt;/p&gt;

&lt;p&gt;That way, we (developers) are happy since we can use new &lt;strong&gt;JS&lt;/strong&gt; features, and browsers are also happy because they receive syntax they understand.&lt;/p&gt;

&lt;p&gt;That it 🤷‍♂️ easy right ? I hope you guys enjoyed this short article 😃😃&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
    </item>
    <item>
      <title>Shortest &amp; Usefullest React component you'll ever use </title>
      <dc:creator>sajedsoliman</dc:creator>
      <pubDate>Sat, 27 Mar 2021 17:17:49 +0000</pubDate>
      <link>https://dev.to/sajedsoliman/shortest-usefullest-react-component-you-ll-ever-use-p4i</link>
      <guid>https://dev.to/sajedsoliman/shortest-usefullest-react-component-you-ll-ever-use-p4i</guid>
      <description>&lt;h1&gt;
  
  
  React (&lt;strong&gt;IF&lt;/strong&gt;) component for conditional rendering.
&lt;/h1&gt;

&lt;p&gt;Have you bothered writing that conditional rendering syntax and getting that curly braces shape, therefore getting chaos and messy code?.&lt;/p&gt;

&lt;p&gt;You will never ever use it again with this 1 line of code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// (elseChildren = null) because you won't always have else
statement.
export default IF(condition, children, elseChildren = null) {
      return condition ? children : elseChildren
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then you can use it anywhere.&lt;br&gt;
&lt;/p&gt;

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

function mustSleep({time}) {
    return (
        &amp;lt;h1&amp;gt;
            &amp;lt;IF condition={time &amp;gt;= 9} 
                elseChildren={Write Code.}&amp;gt;
                Go Sleep!
             &amp;lt;/IF&amp;gt;
        &amp;lt;/h1&amp;gt;  
    )
}

export default mustSleep
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don't hesitate to add this component to your project&lt;br&gt;
and be clean with your code!&lt;/p&gt;

&lt;p&gt;I genuinely hope that helped you devs!.&lt;br&gt;
Inspiring by this article: &lt;a href="https://www.stefanjudis.com/snippets/a-react-if-component/"&gt;A React "if component"&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>programming</category>
      <category>codequality</category>
    </item>
  </channel>
</rss>
