<?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: Emmax</title>
    <description>The latest articles on DEV Community by Emmax (@emmanx).</description>
    <link>https://dev.to/emmanx</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%2F206352%2F632d0e22-7d7f-42d6-b21a-188c73528e18.jpeg</url>
      <title>DEV Community: Emmax</title>
      <link>https://dev.to/emmanx</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/emmanx"/>
    <language>en</language>
    <item>
      <title>Free Figma UI designs for frontend practice.</title>
      <dc:creator>Emmax</dc:creator>
      <pubDate>Mon, 25 Jan 2021 11:56:54 +0000</pubDate>
      <link>https://dev.to/emmanx/free-figma-ui-designs-for-frontend-practice-3ak2</link>
      <guid>https://dev.to/emmanx/free-figma-ui-designs-for-frontend-practice-3ak2</guid>
      <description>&lt;p&gt;Budding frontend engineers are always looking for designs to practice their frontend skills. Was going through the figma community page and found some amazing free UI designs from talented and awesome designers from the Figma community.&lt;/p&gt;

&lt;p&gt;Enjoy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beautiful landing page sections for a startup app
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.figma.com/file/7l1Ar0sPDERTOqMYBqElAp/Landing-Page-Startup-App"&gt;Go to design&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Minimal sleek portfolio design
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.figma.com/file/gKZoWoleFgP35xvYu83Y2l/Portfolio-UI-Web-and-Mobile"&gt;Go to design&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Landing page design
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.figma.com/file/EWmzcVkd7qbP5Nf7iMvuqP/Trafalgar-Landing-Page"&gt;Go to design&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Food spin interaction design
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.figma.com/file/4pXrAZ1J7u6FI73jUZKQJl/foodSpin-interaction"&gt;Go to design&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Website of architects
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.figma.com/file/ySfVuQB0jsuLLwu2FBZVje/Website-of-architects"&gt;Go to design&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Finance landing page UI kit
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.figma.com/file/ogoNRQ5egC7jcd3ufySk30/FINANCE-LANDING-PAGE-UI-kit"&gt;Go to design&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Registration onboarding design
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.figma.com/file/40tenCelTiMi2CzeY0iop5/Registration-Onboarding-Design"&gt;Go to design&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Dark landing page design
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.figma.com/file/hMVtKRVHUxyY03knIrHkgG/MNTN-Landing-Page"&gt;Go to design&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Analytics — landing page design
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.figma.com/file/K8RIvVtJKHdXIqjpAPe97y/Analytics-%E2%80%94-Landing-Page-Design"&gt;Go to design&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Food delivery app design
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.figma.com/file/KawxNnCZ1epHjQu0wSqlG2/Food-delivery-app-Ui-kit"&gt;Go to design&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  VPN service landing page
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.figma.com/file/y4g7B9BSJsuPkI101iyF5E/FREEBIES-Landingpage-LaslesVPN-Community"&gt;Go to design&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I hope you find them helpful... Feel free to go through the &lt;a href="https://www.figma.com/community"&gt;Figma Community Page&lt;/a&gt; to find more.&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>design</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Building a custom React image upload widget with progress bar.</title>
      <dc:creator>Emmax</dc:creator>
      <pubDate>Wed, 13 Jan 2021 05:48:19 +0000</pubDate>
      <link>https://dev.to/emmanx/building-a-custom-react-image-upload-widget-with-progress-bar-fpi</link>
      <guid>https://dev.to/emmanx/building-a-custom-react-image-upload-widget-with-progress-bar-fpi</guid>
      <description>&lt;p&gt;In this article, I'll be walking you through how to create a simple custom react file upload widget with a progress upload bar.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;This article assumes some previous knowledge of basic React and making HTTP requests.&lt;/p&gt;

&lt;p&gt;For the purpose of this article, I have created a very basic API to handle the file upload on the server using Nest.js and deployed it to Heroku. Here's the endpoint where we'll be making our POST request to - &lt;strong&gt;&lt;a href="https://nestjs-upload.herokuapp.com/"&gt;https://nestjs-upload.herokuapp.com/&lt;/a&gt;&lt;/strong&gt; Uploaded files are automatically deleted every 5mins and I have implemented rate-limiting so the upload service can survive public usage for testing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup a react project using
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;yarn&lt;/span&gt; &lt;span class="nx"&gt;create&lt;/span&gt; &lt;span class="nx"&gt;react&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="nx"&gt;upload&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;widget&lt;/span&gt; &lt;span class="c1"&gt;// NPM works too&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Feel free to clean up the setup however you like and remove whatever files you don't need.&lt;/p&gt;

&lt;h2&gt;
  
  
  The API call
&lt;/h2&gt;

&lt;p&gt;Install Axios by running&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;yarn&lt;/span&gt; &lt;span class="nx"&gt;add&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Proceed to create a file called upload.js can add the following code to it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;axios&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;uploadFile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setPercentage&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;onUploadProgress&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;progressEvent&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;loaded&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;total&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;progressEvent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;percent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;loaded&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;total&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;percent&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="nx"&gt;setPercentage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;percent&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://nestjs-upload.herokuapp.com/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;options&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;uploadFile&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What's going on?
&lt;/h2&gt;

&lt;p&gt;For the most part, we are simply making a POST request to an endpoint that's supposed to process our request and send back some response... The part that might seem unfamiliar is the&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;onUploadProgress&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;progressEvent&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Do whatever you want with the native progress event&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;onUploadProgress&lt;/strong&gt; allows handling of progress events for uploads. There is a &lt;strong&gt;onDownloadProgress&lt;/strong&gt; which I believe does the same thing but for downloads.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;loaded&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;total&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;progressEvent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We are destructuring &lt;strong&gt;loaded&lt;/strong&gt; and &lt;strong&gt;total&lt;/strong&gt; from the &lt;strong&gt;progressEvent&lt;/strong&gt; parameter that we are given access to, where &lt;strong&gt;loaded&lt;/strong&gt; refers to how much has been uploaded and &lt;strong&gt;total&lt;/strong&gt; is the total size to be uploaded&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;percent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;loaded&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;total&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;percent&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;setPercentage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;percent&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And finally, we are using some basic maths to calculate the percent and calling a &lt;strong&gt;setPercentage&lt;/strong&gt; function which will be passed in as an argument from wherever we call our upload function. &lt;/p&gt;

&lt;p&gt;That wraps up the first part of the task - &lt;em&gt;writing the upload logic&lt;/em&gt;. It's time to implement the React component that will use this upload function. &lt;/p&gt;

&lt;p&gt;I'll just dump the code then proceed to explain what's happening.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;uploadFile&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./upload&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;UploadWidget&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;percentage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setPercentage&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;handleFile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;files&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;formData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;FormData&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
      &lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;image&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

      &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;uploadFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setPercentage&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nx"&gt;setPercentage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;setPercentage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Click&lt;/span&gt; &lt;span class="nx"&gt;here&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;browse&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/p&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="nx"&gt;onChange&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handleFile&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;file&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;percentage&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;%&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/p&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;UploadWidget&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Breakdown
&lt;/h2&gt;

&lt;p&gt;We've initialized a piece of state to keep track of the upload percentage which would be updated when the &lt;strong&gt;onUploadProgress&lt;/strong&gt; event is fired because we passed the &lt;strong&gt;setPercentage&lt;/strong&gt; function into our upload function. Below is a code sandbox of a working implementation with the CSS styling included.&lt;/p&gt;

&lt;p&gt;I hope you found this helpful. Share your thoughts in the comments section.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/react-upload-widget-swdxi"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  PS
&lt;/h2&gt;

&lt;p&gt;The goal was to keep this short and focused on the &lt;strong&gt;onUploadProgress&lt;/strong&gt; event and how to track the upload progress, you can build up on this by adding file type and size checks and restructuring the code into a nice little reusable &lt;strong&gt;useUpload&lt;/strong&gt; hook for your project(s). &lt;/p&gt;

</description>
      <category>react</category>
    </item>
    <item>
      <title>Fear Not!!! Here's why DIY No-Code Services will never replace developers.</title>
      <dc:creator>Emmax</dc:creator>
      <pubDate>Tue, 30 Jun 2020 18:26:17 +0000</pubDate>
      <link>https://dev.to/emmanx/fear-not-here-s-why-diy-no-code-services-will-never-replace-developers-38pd</link>
      <guid>https://dev.to/emmanx/fear-not-here-s-why-diy-no-code-services-will-never-replace-developers-38pd</guid>
      <description>&lt;h2&gt;
  
  
  Do not be afraid; our fate cannot be taken from us; it is a gift. — Dante Alighieri
&lt;/h2&gt;

&lt;h2&gt;
  
  
  The birth of No-Code Softwares
&lt;/h2&gt;

&lt;p&gt;The power to create tech solutions has stayed with software engineers for years. Regardless of the industry, whenever a brand needed a tech solution implemented they came to us, the ones who could build anything from an empty file, &lt;em&gt;I'm sure you sense the pride in my tone&lt;/em&gt; . But over the last few years, the use cases for software solutions and the tools required to implement them have gotten more complicated, which has led to the need for larger software teams, longer development timelines, and all these have contributed to making software solutions more expensive to build.&lt;/p&gt;

&lt;p&gt;For small to medium-sized brands paying a software team millions to build a service for them might not be a good idea, hence brands and businesses began the search for software solutions that were fast to get up and running and were cheaper and of course innovators listened to their requests.&lt;/p&gt;

&lt;p&gt;Fast forward to recent times we have seen a deluge of these so-called no-code platforms allowing pretty much anyone to set up services for various industries with little or no help. We have witnessed the release of some very impressive no-code solutions - I mean these days a seller can go from screaming &lt;em&gt;we are still taking orders&lt;/em&gt; on their WhatsApp stories to having a fully functional eCommerce solution in a couple of hours without contacting a developer. &lt;/p&gt;

&lt;p&gt;Combine that with statements like &lt;em&gt;"The future of coding is no coding at all." -&lt;/em&gt; Chris Wanstrath the fear ought to kick in. Also, in case you were wondering why we should care what Chris thinks he is a former CEO at GitHub.&lt;/p&gt;

&lt;p&gt;In the middle of this invasion is there any hope for developers?&lt;/p&gt;

&lt;h2&gt;
  
  
  The bootstrap paradox
&lt;/h2&gt;

&lt;p&gt;The &lt;em&gt;bootstrap paradox&lt;/em&gt; is a hypothetical causal loop in time travel in which one event causes a second, which was actually the cause of the first. &lt;em&gt;Netflix's Dark does a good job of explaining this&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Yeah I know you are wondering what time travel concepts have to do with any of this but bear with me. Essentially as developers, our job is to build solutions for the future. Developers built these no-code platforms in the first place and in doing so we also secured the relevance of our own existence. &lt;/p&gt;

&lt;p&gt;Companies who rely on these no-code solutions will continue to request more features that better suit their needs and solves their problems and developers would always be there to ensure that these features and updates are implemented and hence an endless cycle is created.&lt;/p&gt;

&lt;p&gt;There would also be companies who need to solve bigger unique problems outside the capabilities of these no-code services, and without an understanding of the complex algorithms happening behind the scenes you can't build tools and services that either simplify or eliminate their problems.&lt;/p&gt;

&lt;p&gt;These platforms exist because of brilliant developers, and brilliant developers are always working on new and better ways to solve problems so upcoming developers just learning HTML and CSS should not be scared of getting replaced but instead should know they just have to do more to separate themselves from the average group.&lt;/p&gt;

&lt;h3&gt;
  
  
  “You never change things by fighting the existing reality. To change something, build a new model that makes the existing model obsolete.” —&lt;em&gt;Buckminster Fuller&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Stay Safe.&lt;/p&gt;

</description>
      <category>career</category>
      <category>beginners</category>
      <category>motivation</category>
    </item>
    <item>
      <title>Lessons learned from my journey as a developer in 2019</title>
      <dc:creator>Emmax</dc:creator>
      <pubDate>Tue, 17 Dec 2019 23:09:34 +0000</pubDate>
      <link>https://dev.to/emmanx/lessons-learned-from-my-journey-as-a-developer-in-2019-5e75</link>
      <guid>https://dev.to/emmanx/lessons-learned-from-my-journey-as-a-developer-in-2019-5e75</guid>
      <description>&lt;p&gt;DISCLAIMER&lt;/p&gt;

&lt;p&gt;I'd like to say I am not a writer neither am I a tech blogger, I'm just your &lt;strong&gt;!average&lt;/strong&gt; developer who thought it would be helpful to share some of the things I learned during my journey as a developer in the past year and my plans for 2020. I was also too lazy to proof-read this so sorry for any typos encountered.&lt;/p&gt;

&lt;p&gt;Here goes nothing. Below is my list of top insightful lessons learned as a developer in 2019&lt;/p&gt;

&lt;h2&gt;
  
  
  Experts struggle
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Senior Engineer&lt;/strong&gt; - The job title we all aim for when we start out. I soon realized that the picture I had painted in my head of the expert developer was nothing but a myth. Its to easy to see other devs on Twitter and the internet as a whole with a bunch audience and think they have it all figured out, but the truth is no one shares their struggles, no one tells you how hard it is, just that they got invited to speak at a conference on the moon!.&lt;/p&gt;

&lt;h2&gt;
  
  
  Taking a break could sometimes give clarity
&lt;/h2&gt;

&lt;p&gt;As someone who spent a long time learning to code in isolation I know how quickly and easily you can lose your mind during those frustrating moments... &lt;em&gt;I'm looking at you JS Closures&lt;/em&gt;.&lt;br&gt;
I have had solutions come to me in the weirdest places... some you don't even wanna hear, but all I needed to do was leave my desk.&lt;/p&gt;

&lt;h2&gt;
  
  
  Having a side project is key
&lt;/h2&gt;

&lt;p&gt;Once you get that job it's easy to get bored especially if you are stuck repeating the same things daily. I found that having a side project with no rules and endless possibilities sometimes reminded me of how fun it is to code with no deadlines hanging over your head.&lt;/p&gt;

&lt;h2&gt;
  
  
  Nothing replaces strong fundamentals
&lt;/h2&gt;

&lt;p&gt;Get comfy with the fundamentals before moving to the more advanced topics!!!. There's usually all this pressure from the community to learn or jump on the hottest new framework but the simple truth is you are only setting up yourself to become a mediocre developer. Frameworks like jQuery, React and the others are not replacements for Javascript, they are JS based!, Bootstrap is not a replacement for learning CSS, I can go on but you get the gist.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tutorials can only take you so far
&lt;/h2&gt;

&lt;p&gt;The term &lt;strong&gt;Tutorial Purgatory&lt;/strong&gt; is not a new concept in the programming world. We've all been there, that sweet comfy zone where we inject ourselves with a &lt;strong&gt;false sense of progress and understanding&lt;/strong&gt; watching different courses on the same concepts because we are too scared to take that leap and start a project. Which brings me to my next lesson.&lt;/p&gt;

&lt;h2&gt;
  
  
  You don't need to know how to start
&lt;/h2&gt;

&lt;p&gt;You don't need to have it all figured out at the start of a project. You just start and figure it out as you go!. I have started projects with absolutely no idea what I was doing. This also made me realize no software comes out perfect in the first release, that'why there are versions and different iterations of the features.&lt;/p&gt;

&lt;h2&gt;
  
  
  You're good enough
&lt;/h2&gt;

&lt;p&gt;Imposter Syndrome is a b++ch... One of the biggest realizations I had this past year was that someone somewhere who isn't nearly as good as you are has a better job with a higher pay doing the exact same things you know... Leave your bubble and start applying to those jobs... Like I tell my folks they'll tell you the exact same thing they'll tell everyone else at the interview &lt;em&gt;we'll get back to you&lt;/em&gt;. So there's nothing at stake.&lt;/p&gt;

&lt;p&gt;So I think that concludes the end of this &lt;em&gt;whatever this is&lt;/em&gt; Turned out to be much longer than I anticipated. I hope this encouraged someone!... Happy Holidays.&lt;/p&gt;

&lt;p&gt;Please share your thoughts in the comments and let me know if you'd like me to do this more in 2020 along with what you'd like me to talk about or teach. (Videos included). &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>career</category>
    </item>
  </channel>
</rss>
