<?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>Forem: Moch Farras Fauzan</title>
    <description>The latest articles on Forem by Moch Farras Fauzan (@frrsfuzn).</description>
    <link>https://forem.com/frrsfuzn</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%2F664821%2F074e88f9-31dd-451f-8365-666e2b79781a.jpeg</url>
      <title>Forem: Moch Farras Fauzan</title>
      <link>https://forem.com/frrsfuzn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/frrsfuzn"/>
    <language>en</language>
    <item>
      <title>Get Faster Creating React Project with Vite</title>
      <dc:creator>Moch Farras Fauzan</dc:creator>
      <pubDate>Sat, 17 Jul 2021 17:46:52 +0000</pubDate>
      <link>https://forem.com/frrsfuzn/get-faster-creating-react-project-with-vite-4gmf</link>
      <guid>https://forem.com/frrsfuzn/get-faster-creating-react-project-with-vite-4gmf</guid>
      <description>&lt;p&gt;I am new in react and also still learning how to use react. I'm using create-react-app to make react project. The first thing that I notice whenever I created react project with create-react-app are;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The time it took to make a single project .&lt;/li&gt;
&lt;li&gt;The time it took to start the project.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But all that changed when I got to know ViteJs&lt;/p&gt;

&lt;h3&gt;
  
  
  What is ViteJs?
&lt;/h3&gt;

&lt;p&gt;According to vite website, Vite is a French word that means "Fast". So, vite is a build tool that aims to provide a faster and leaner development experience for modern web projects. ViteJs is made by the creator of VueJS.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why using Vite?
&lt;/h3&gt;

&lt;p&gt;When starting the project server, a bundler-based build setup has seek to your application and build entire application before it can be served.&lt;/p&gt;

&lt;p&gt;Vite improves the time that dev server took by dividing the modules in an application into two categories:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Dependencies, Vite pre-bundles dependencies using esbuild. Esbuild is written in Go and pre-bundles dependencies 10-100x faster than JavaScript-based bundlers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Source code often contains non-javascript like JSX, CSS, or React components that used to be edited very often. Vite only needs to transform and serve source code on demand, as the browser requests it. Code behind conditional dynamic imports is only processed if actually used on the current screen.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Performance between Vite vs create-react-app
&lt;/h3&gt;

&lt;p&gt;To do this testing, I measure the time that both of them took to create and launch react project. And here is the difference between both of them.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl02ylqet3g3t5atqz05b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl02ylqet3g3t5atqz05b.png" alt="image"&gt;&lt;/a&gt;&lt;br&gt;
As you can see the result has significant difference. Either create project or launch project, Vite has a better performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to create react with Vite
&lt;/h3&gt;

&lt;p&gt;To make react project with Vite is very simple. All you need to do is follow this instruction.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;npm init vite@latest&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Enter project name and select framework (in this case I use React)
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F24ah47tekp8r3uxxb8yw.png" alt="image"&gt;
&lt;/li&gt;
&lt;li&gt;Then select react variant (I choose react)
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1jp1gvj3zha9yrw4qnsz.png" alt="image"&gt;
&lt;/li&gt;
&lt;li&gt;Go to your project app folder and enter &lt;code&gt;npm install&lt;/code&gt; command. Your project will be ready within a minute.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So that's it what I could share. I'm truly sorry if my English is not good because it isn't my mother tongue. But I keep learning English to make it better. Writing blog also my learning method to improve my English. So if you have any feedback related to the content or to my English, feel free to share!&lt;/p&gt;

&lt;p&gt;References&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=LQQ3CR2JTX8&amp;amp;ab_channel=codeSTACKr" rel="noopener noreferrer"&gt;Vite 2.0 Crash Course by codeSTACKr&lt;/a&gt;&lt;br&gt;
&lt;a href="https://medium.com/swlh/vitejs-and-react-eb3f1afc6e6" rel="noopener noreferrer"&gt;Vitejs and React by Roberto Butti&lt;/a&gt;&lt;br&gt;
&lt;a href="https://vitejs.dev/guide/#index-html-and-project-root" rel="noopener noreferrer"&gt;Getting Started by Vite&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vite</category>
      <category>react</category>
      <category>createreactapp</category>
    </item>
    <item>
      <title>Second Week at Gigih - a Weekly Reflection</title>
      <dc:creator>Moch Farras Fauzan</dc:creator>
      <pubDate>Sat, 17 Jul 2021 14:02:42 +0000</pubDate>
      <link>https://forem.com/frrsfuzn/second-week-at-gigih-a-weekly-reflection-369b</link>
      <guid>https://forem.com/frrsfuzn/second-week-at-gigih-a-weekly-reflection-369b</guid>
      <description>&lt;h3&gt;
  
  
  How much did you know about the subject before we started?
&lt;/h3&gt;

&lt;p&gt;I always started each session of the program by doing a prior research around the materials so I could get a better grasp beforehand. This method really helped me out to learn faster and to better understand the upcoming materials. The facilitators, the instructors, and also my fellow friends in this program gave a lot of references for me to learn from. Furthermore, I knew that if I learn while also practicing the material at the same time, it would really give me more comprehension towards the materials rather than just reading or watching the course given.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do you feel about your work this week (homework, assignment)? What parts do you particularly like? Dislike? Why? What did/do you enjoy about this piece or work?
&lt;/h3&gt;

&lt;p&gt;People say that time flies when you’re having fun. Now I genuinely understand the meaning behind that saying. I still can not believe now I am at second week in Gigih Program by Yayasan Anak Bangsa Bisa. I am truly having great time in this program. There are so many great facilitators, instructors and friends that helped me a lot during my journey at Gigih Program. &lt;/p&gt;

&lt;p&gt;Even though it was quite a challenge because I just started my journey in web development but the atmosphere that I get from Gigih Program is quite relaxing and assuring for me to pursue this path. They always told me that it is okay to fail, but one thing that I keep in mind is I have to always try. Now I have been implementing that principal to my daily life. And since then I am always brave to try new things. I am convinced that I am not scared of failure because I know that I would be more disappointed if I did not try at all.&lt;/p&gt;

&lt;h3&gt;
  
  
  How can you use this knowledge in future work?
&lt;/h3&gt;

&lt;p&gt;This knowledge has certainly changed my life forever. Previously, I only knew that frontend was only things such as html, css and js. I didn't really knew that frontend had so many things that I took interested in. Like React, Nodejs, Reactstrap and etc. This new knowledge gave me a fresh new passion to learn more. So that in the future I could build a professional website or application with the knowledge I got from here for collaborations with companies and also for the society.&lt;/p&gt;

&lt;p&gt;Lastly, I want to quote a sentence from one of my favorite books, "Atomic habits", that said “You should be far more concerned with your current trajectory than with your current results”. So, with my current trajectory at Gigih Program, I believe that I will reach my goal to be a Frontend Engineer. I give my biggest applause for Gigih Program by Yayasan Anak Bangsa Bisa. Above all, thank you for this amazing opportunity!&lt;/p&gt;

</description>
      <category>gigih</category>
      <category>yayasananakbangsabisa</category>
      <category>frontend</category>
      <category>react</category>
    </item>
  </channel>
</rss>
