<?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: Kunal Keshan</title>
    <description>The latest articles on DEV Community by Kunal Keshan (@kunalkeshan).</description>
    <link>https://dev.to/kunalkeshan</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%2F731250%2F86385527-3a87-4728-86e8-41711975bf31.png</url>
      <title>DEV Community: Kunal Keshan</title>
      <link>https://dev.to/kunalkeshan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kunalkeshan"/>
    <language>en</language>
    <item>
      <title>Learn How to use Context and Reducer Hooks in React.js by Creating a Global Snackbar.</title>
      <dc:creator>Kunal Keshan</dc:creator>
      <pubDate>Sun, 22 Jan 2023 01:30:00 +0000</pubDate>
      <link>https://dev.to/kunalkeshan/learn-how-to-use-context-and-reducer-hooks-in-reactjs-by-creating-a-global-snackbar-54pk</link>
      <guid>https://dev.to/kunalkeshan/learn-how-to-use-context-and-reducer-hooks-in-reactjs-by-creating-a-global-snackbar-54pk</guid>
      <description>&lt;p&gt;The Context (&lt;code&gt;createContext&lt;/code&gt; and &lt;code&gt;useContext&lt;/code&gt;) and the Reducer (&lt;code&gt;useReducer&lt;/code&gt;) hooks in React.js might seem to be complicated and in the beginning, I felt that too. I had used them before, but never really understood fully how they worked, until I tried implementing them in a test project.&lt;/p&gt;

&lt;p&gt;In this tutorial, I'll show you,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Why and how you can use the Context and Reducer Hooks,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bootstrap your React.js App with Vite,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a Global state management system using them and&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a snack bar that can be accessed anywhere from your application (without having to perform &lt;a href="https://www.geeksforgeeks.org/what-is-prop-drilling-and-how-to-avoid-it/"&gt;prop drilling&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's the GitHub Repository that I'll be following along for this tutorial. You can skip to it directly if you're interested.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A9-wwsHG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/kunalkeshan"&gt;
        kunalkeshan
      &lt;/a&gt; / &lt;a href="https://github.com/kunalkeshan/global-snackbar-with-react-typescript-context"&gt;
        global-snackbar-with-react-typescript-context
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Discover the power of Context &amp;amp; Reducer Hooks in React.js by creating a global snack bar using TypeScript and bootstrapping with Vite.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
Learn How to use Context and Reducer Hooks in React.js by Creating a Global Snackbar 🚀&lt;/h1&gt;
&lt;p&gt;Discover the power of Context &amp;amp; Reducer Hooks in React.js by creating a global snack bar using TypeScript and bootstrapping with Vite.&lt;/p&gt;
&lt;p&gt;
    &lt;a href="https://blog.kunalkeshan.dev/learn-how-to-use-context-and-reducer-hooks-in-reactjs-by-creating-a-global-snackbar" rel="nofollow"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mKPxMgr6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/kunalkeshan/global-snackbar-with-react-typescript-context./public/thumbnail.png" alt="Learn How to use Context and Reducer Hooks in React.js by Creating a Global Snackbar" width="60%"&gt;
        &lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Click to Read!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Table of Contents&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/global-snackbar-with-react-typescript-context#introduction"&gt;Introduction ✊&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/global-snackbar-with-react-typescript-context#getting-started"&gt;Getting Started ⚡&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/global-snackbar-with-react-typescript-context#license"&gt;License 🪪&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/global-snackbar-with-react-typescript-context#contributing"&gt;Contributing 📥&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
Introduction&lt;/h2&gt;
&lt;p&gt;This repository is part of the &lt;a href="https://blog.kunalkeshan.dev/learn-how-to-use-context-and-reducer-hooks-in-reactjs-by-creating-a-global-snackbar" rel="nofollow"&gt;Learn How to use Context and Reducer Hooks in React.js by Creating a Global Snackbar&lt;/a&gt; article and illustrates the following.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Setting up an React.js + TypeScript App using Vite.&lt;/li&gt;
&lt;li&gt;Using the &lt;code&gt;createContext&lt;/code&gt; and &lt;code&gt;useContext&lt;/code&gt; hooks.&lt;/li&gt;
&lt;li&gt;Using the &lt;code&gt;useReducer&lt;/code&gt; hook.&lt;/li&gt;
&lt;li&gt;Using the implementation to create a Global Snackbar.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The idea is understand how Context and Reducer Hooks can be used in a combination to create your own Global State management System to avoid issues like Prop Drilling.&lt;/p&gt;
&lt;p&gt;This project creates a very raw implementation of a snackbar using only the…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/kunalkeshan/global-snackbar-with-react-typescript-context"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h1&gt;
  
  
  Prerequisites
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Familiarity with JavaScript.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React Fundamentals (Components, Data Handling, Hooks (useState, and useEffect).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's begin...&lt;/p&gt;

&lt;h1&gt;
  
  
  Why use Context and Reducer Hooks?
&lt;/h1&gt;

&lt;p&gt;One of the most common issues you'll run into react is that you'll end up passing down states and their set state functions as props from one component to another, and end up going 5 - 10 levels down. This is known as &lt;strong&gt;prop drilling&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is bad because when one of your states faces an issue, tracking it back to its parent is going to be a nightmare 😱 and whenever you change the value of a state, all the components where the state was passed down will undergo rerendering, even the ones where you're not using the state at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Context Hooks to the Rescue! 🦸
&lt;/h2&gt;

&lt;p&gt;The Context Hooks allows access to data from a higher level without having to pass it down from one component to other.&lt;/p&gt;

&lt;p&gt;In the traditional approach, you would create a state at the top level and then pass it down from one level to the next. With Context however, you just need to create a Context Object, use the Context Provider to wrap your application with it and then either use the Context Consumer or the useContext Hook to access the data from the Context.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating a Context
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;React.createContext()&lt;/code&gt; is used to create a context object (the data that you want to keep global), it takes in its argument as the initial value of the context object.&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;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;AppContext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createContext&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;light&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Providing the Context to Your Application
&lt;/h3&gt;

&lt;p&gt;After you've created the context object, the next step is to use the &lt;code&gt;AppContext.Provider&lt;/code&gt; to give access to the context object to the components under the provider.&lt;/p&gt;

&lt;p&gt;Think of it this way, if there's some water, and you need to pass it down to 3-4 pipes at a time, but you have only one tap. How would you do it? You would create a pipe to &lt;em&gt;provide&lt;/em&gt; to all the other pipes from the tap.&lt;/p&gt;

&lt;p&gt;It's the same way the &lt;code&gt;Provider&lt;/code&gt; is used to give access to the context object to all of your other components as well.&lt;/p&gt;

&lt;p&gt;The tap here was the flow of the data and the water here is the data itself, so with the provider, you'll need to pass in some value as well. This value that you pass can be accessed by consuming the context. (Coming up on the next section)&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="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;AppContext&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="s1"&gt;./AppContext&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;Navbar&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./components/Navbar&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;Footer&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./components/Footer&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;Main&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./components/Main&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;App&lt;/span&gt; &lt;span class="o"&gt;=&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;theme&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setTheme&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dark&lt;/span&gt;&lt;span class="dl"&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;AppContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Provider&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt;&lt;span class="nx"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setTheme&lt;/span&gt;&lt;span class="p"&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;Navbar&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;Main&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;Footer&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="sr"&gt;/AppContext.Provider&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;App&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Using the Context in another Component
&lt;/h3&gt;

&lt;p&gt;Once the provider is set up, we can access the context data in two ways. By using the &lt;code&gt;AppContext.Consumer&lt;/code&gt; or the &lt;code&gt;useContext&lt;/code&gt; hook.&lt;/p&gt;

&lt;p&gt;The Consumer component returns a function through which you can access the context data and then return the component you want to use the data in.&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="cm"&gt;/* Navbar.js */&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&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;AppContext&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../AppContext&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;Navbar&lt;/span&gt; &lt;span class="o"&gt;=&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;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;AppContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Consumer&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;theme&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;nav&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;}&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;/nav&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&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;/AppContext.Consumer&amp;gt; &lt;/span&gt;&lt;span class="err"&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;Navbar&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or you can alternatively use the &lt;code&gt;useContext&lt;/code&gt; hook as well to access the data from AppContext.&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="cm"&gt;/* Navbar.js */&lt;/span&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;useContext&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="s1"&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;AppContext&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../AppContext&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;Navbar&lt;/span&gt; &lt;span class="o"&gt;=&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;theme&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useContext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;AppContext&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;nav&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;}&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;/nav&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;Navbar&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Upgrade with the Reducer Hook 📈
&lt;/h2&gt;

&lt;p&gt;Now that we've successfully brought up our data to a global level, there's still an issue! We still end up using the &lt;code&gt;useState&lt;/code&gt; hook to create states and state dispatchers. And we'll still end up importing various &lt;code&gt;setState&lt;/code&gt; types of functions to the components where we'll need them and cloud the context object with the number of states.&lt;/p&gt;

&lt;p&gt;An alternative approach could be a create a complex state, have only one state object and one set state, but then you'll end up writing complex logic for each use case of where you're implementing the state. This is not exactly the best practice.&lt;/p&gt;

&lt;p&gt;We can instead switch to a more action-based method of updating your application state using the Reducer Hook. It's pretty simple to set up and use throughout your application.&lt;/p&gt;

&lt;h3&gt;
  
  
  The &lt;code&gt;useReducer&lt;/code&gt; Hook
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;useReducer&lt;/code&gt; hook takes in two arguments. The first is a &lt;code&gt;reducer&lt;/code&gt; function and the second one is the initial value of the state. It returns the state and a dispatch function which is used to update the state, it's pretty similar to the&lt;code&gt;setState&lt;/code&gt; function that we use to update the state's value.&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="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;useReducer&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="s1"&gt;react&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;App&lt;/span&gt; &lt;span class="o"&gt;=&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;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useReducer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;reducer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dark&lt;/span&gt;&lt;span class="dl"&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="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;App&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Dispatch Function
&lt;/h3&gt;

&lt;p&gt;The Dispatch function is very similar to the &lt;code&gt;setState&lt;/code&gt;. You can pass in an argument to update the state. When the dispatch function is called, it triggers the reducer function (mentioned below) which is used to return the updated state value.&lt;/p&gt;

&lt;p&gt;The dispatch function doesn't return any value, rather it's only used to send a new state value that needs to be updated.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reducer Function
&lt;/h3&gt;

&lt;p&gt;The reducer function is called every time the dispatch function is called. It takes in two arguments, the previous state and an action object.&lt;/p&gt;

&lt;p&gt;In general, you can set up your own logic to update the state, however, with the action approach, you can make state updates more action-oriented. But what does the action object contain? What you pass in the dispatch function can be accessed in the action object.&lt;/p&gt;

&lt;p&gt;It contains the type of action you want to perform and the payload (state updates) that are associated with that action type. So, you'd see tons of applications having a switch case statement inside the reducer function to handle various action types and update the state based on the payload.&lt;/p&gt;

&lt;p&gt;The reducer function returns the updated state which is then reflected wherever the state object from the &lt;code&gt;useReducer&lt;/code&gt; hook is used.&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;reducer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;action&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;switch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;LOGIN&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isLoggedIn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&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="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;default&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="nx"&gt;state&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="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;reducer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Create React + TS App With Vite
&lt;/h1&gt;

&lt;p&gt;Bootstrapping a React application with TypeScript using Vite is pretty simple and straightforward. You can follow the steps mentioned below or follow the &lt;a href="https://vitejs.dev/guide/"&gt;Vite documentation&lt;/a&gt; for detailed instructions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using Yarn&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn create vite global-snackbar-app &lt;span class="nt"&gt;--template&lt;/span&gt; react-ts
&lt;span class="nb"&gt;cd &lt;/span&gt;global-snackbar-app
yarn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create the app, open it up and install all the dependencies.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pyiJNrl1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vcvdqqytf13fanm45j84.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pyiJNrl1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vcvdqqytf13fanm45j84.jpg" alt="Image description" width="706" height="567"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The default Vite setup should be something like the one mentioned above. Next up just start the application using the following command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Application Set Up 🤖
&lt;/h2&gt;

&lt;p&gt;Most of our application set-up will be inside the &lt;code&gt;src&lt;/code&gt; folder, the file structure is mentioned below and a quick overview for each as well.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oP1wLQIn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l2mizwjazldt69tm6jg6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oP1wLQIn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l2mizwjazldt69tm6jg6.jpg" alt="Image description" width="497" height="713"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;@types/index.d.ts - The Type declarations that will be common throughout our app are declared here.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;components - The various components of our app.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;context - Keeping the context separate from the app. Separating the state from the application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;css - Application Styling CSS files&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;reducer - The reducer function is declared here with the logic for each action type declared in it.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before we get started with setting up the system, visit the repository associated with this project so you can follow along with the implementation - &lt;a href="https://github.com/kunalkeshan/global-snackbar-with-react-typescript-context"&gt;https://github.com/kunalkeshan/global-snackbar-with-react-typescript-context&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Global State Management System 🌐
&lt;/h2&gt;

&lt;p&gt;We're going the combine the Context and the Reducer Hooks to create a global state management system. Context is used to provide and consume the state throughout the app while reducer is used to update the state with the dispatch function and keep them action-oriented.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating a Context
&lt;/h3&gt;

&lt;p&gt;We'll be creating two different contexts. One for the application state and the other for the dispatch function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/* context/AppContext.tsx */&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createContext&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="s1"&gt;react&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;AppContext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;createContext&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;AppState&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;as&lt;/span&gt; &lt;span class="nx"&gt;AppState&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;AppContext&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/* context/DispatchContext.tsx */&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createContext&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="s1"&gt;react&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;DispatchContext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;createContext&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;DispatchContextType&lt;/span&gt;&lt;span class="o"&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;as&lt;/span&gt; &lt;span class="nx"&gt;DispatchContextType&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;DispatchContext&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;AppState&lt;/code&gt; and the &lt;code&gt;DispatchContextType&lt;/code&gt; are present in the &lt;code&gt;@types/index.d.ts&lt;/code&gt; file. The code for the App and the Dispatch context is easy, we're using the &lt;code&gt;createContext&lt;/code&gt; Hook from react to create the context we want and we're exporting it to access it from other components.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reducer Function
&lt;/h3&gt;

&lt;p&gt;The reducer function is where we'll keep the logic for the state updates which is mentioned below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/** reducer/reducer.ts
 * Reducer Function
 */&lt;/span&gt;

&lt;span class="c1"&gt;// Dependencies&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&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;reducer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;AppState&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;AppActions&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;switch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// When snackbar is open, &lt;/span&gt;
        &lt;span class="c1"&gt;// - spread the previous value&lt;/span&gt;
        &lt;span class="c1"&gt;// - spread the payload (override prev values)     &lt;/span&gt;
        &lt;span class="c1"&gt;// - set open to true&lt;/span&gt;
        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;OPEN_SNACKBAR&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;snackbar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;snackbar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&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="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="c1"&gt;// When snackbar is close&lt;/span&gt;
        &lt;span class="c1"&gt;//  - set open to false&lt;/span&gt;
        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;CLOSE_SNACKBAR&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;snackbar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;open&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&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="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nl"&gt;default&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="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;state&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="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;reducer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Based on the action type that is passed into the dispatch function, the snack bar can either be opened or close. When it's to be opened, the data is updated with the previous data and the updated data from the action payload.&lt;/p&gt;

&lt;p&gt;While closed the open state of the snack bar is updated to false.&lt;/p&gt;

&lt;h3&gt;
  
  
  Putting it all Together
&lt;/h3&gt;

&lt;p&gt;Now that the Context and the reducer are defined, we need to use those to provide our application as a whole. This is done in the &lt;code&gt;App.tsx&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
 * App.tsx
 */&lt;/span&gt;

&lt;span class="c1"&gt;// Dependencies&lt;/span&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;useReducer&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="s1"&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;reducer&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./reducer/reducer&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;AppContext&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./context/AppContext&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;DispatchContext&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./context/DispatchContext&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;Footer&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./components/Footer&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;Main&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./components/Main&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;Navbar&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./components/Navbar&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;Snackbar&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./components/Snackbar&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./css/app.css&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="nf"&gt;App&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// useReducer with the reducer func from './reducer/reducer.ts'&lt;/span&gt;
    &lt;span class="c1"&gt;// The second arg is an initial value for the application state&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;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useReducer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;reducer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;snackbar&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;error&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bottom-right&lt;/span&gt;&lt;span class="dl"&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="c1"&gt;// state is passed into the app context&lt;/span&gt;
    &lt;span class="c1"&gt;// dispatch function is passed into the dispatch context&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;AppContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Provider&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&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;DispatchContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Provider&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&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;div&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;App&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;Navbar&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;Main&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;Footer&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;Snackbar&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="sr"&gt;/div&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;/DispatchContext.Provider&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;/AppContext.Provider&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;App&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;reducer&lt;/code&gt; function is passed into the &lt;code&gt;useReducer&lt;/code&gt; hook and the state and the dispatch from the hook are passed into their respective context providers.&lt;/p&gt;

&lt;h1&gt;
  
  
  Global Snackbar
&lt;/h1&gt;

&lt;p&gt;A basic snack bar has some of the following properties, a message, a type (success, error, info, warning), its positioning and whether it to be open or closed. The mentioned ones are what we'll be implementing.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;message - string&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;open - boolean&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;position - string (bottom-right, bottom-left, top-right, top-left)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;type - string (success, error, info, warning)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3RWOvf8n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3p1bftjoib43r1k1sf3e.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3RWOvf8n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3p1bftjoib43r1k1sf3e.jpg" alt="Image description" width="408" height="82"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ie6EvcXg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jika7tlqiulhyd7ntrez.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ie6EvcXg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jika7tlqiulhyd7ntrez.jpg" alt="Image description" width="408" height="80"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LiXjpQUw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ftchmqcsvrg4nyyu3kd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LiXjpQUw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ftchmqcsvrg4nyyu3kd.jpg" alt="Image description" width="408" height="80"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pHlUDWoF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kd9kccce4yzawu696vjd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pHlUDWoF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kd9kccce4yzawu696vjd.jpg" alt="Image description" width="410" height="82"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can add other properties as the time it should stay open, passing in custom classes and styling, or even custom onClose functions, and for this project, they're currently out of scope.&lt;/p&gt;

&lt;h2&gt;
  
  
  Foundation + Styling 🎨
&lt;/h2&gt;

&lt;p&gt;The layout for the snack bar will consist of the message and the button to close it. We'll add the functionality soon, for now, we just have to set up the snack bar.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
 * Snackbar Component
 */&lt;/span&gt;

&lt;span class="c1"&gt;// Dependencies&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../css/snackbar.css&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;Snackbar&lt;/span&gt; &lt;span class="o"&gt;=&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;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;Snackbar&lt;/span&gt; &lt;span class="nx"&gt;Message&lt;/span&gt; &lt;span class="nx"&gt;over&lt;/span&gt; &lt;span class="nx"&gt;here&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;button&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="err"&gt;✖️&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&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;Snackbar&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The styling for the snack bar is given below. Using CSS Variables we can set the 4 states of the snack bar and change its colour as and when it's dispatched. By default, the snack bar is hidden and is set to open when the show snack bar action is dispatched.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* Snackbar Colors */&lt;/span&gt;
&lt;span class="nd"&gt;:root&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="py"&gt;--success-bg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#5cb85c&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;--error-bg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#d9534f&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;--info-bg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#5bc0de&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;--warning-bg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#f0ad4e&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* Snackbar Container */&lt;/span&gt;

&lt;span class="nc"&gt;.snackbar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt; &lt;span class="m"&gt;2em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;space-between&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;320px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;min-content&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.snackbar&lt;/span&gt; &lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;all&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;unset&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* Snackbar Position classes */&lt;/span&gt;

&lt;span class="nc"&gt;.top-right&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.top-left&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.bottom-left&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.bottom-right&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&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;h2&gt;
  
  
  Functionality ⚙️
&lt;/h2&gt;

&lt;p&gt;To add the functionality we'll need both the &lt;code&gt;AppContext&lt;/code&gt; and the &lt;code&gt;DispatchContext&lt;/code&gt; in our snack bar. We destructure the &lt;code&gt;snackbar&lt;/code&gt; state from the &lt;code&gt;AppContext&lt;/code&gt; and the &lt;code&gt;dispatch&lt;/code&gt; function from the &lt;code&gt;DispatchContext&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The position is set as a &lt;code&gt;className&lt;/code&gt; and these are already determined in the &lt;code&gt;snackbar.css&lt;/code&gt; and the background colour is set into the &lt;code&gt;style&lt;/code&gt; object of the div enclosing the snack bar.&lt;/p&gt;

&lt;p&gt;We've used the &lt;code&gt;dispatch&lt;/code&gt; function to close the snack bar when it is clicked or when the timeout runs out after 6 seconds when it is open. (The timeout can be set as a property in the snack bar state too!)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
 * Snackbar Component
 */&lt;/span&gt;

&lt;span class="c1"&gt;// Dependencies&lt;/span&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;useContext&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="s1"&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;AppContext&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../context/AppContext&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;DispatchContext&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../context/DispatchContext&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../css/snackbar.css&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Can be added as a state to snackbar too!&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;AUTO_CLOSE_SNACKBAR_TIME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;6000&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;Snackbar&lt;/span&gt; &lt;span class="o"&gt;=&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;// Get the snackbar state and the dispatch function&lt;/span&gt;
    &lt;span class="c1"&gt;// using the useContext Hook&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;snackbar&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useContext&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;AppState&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;AppContext&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;dispatch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useContext&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;DispatchContextType&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;DispatchContext&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// When snackbar is open, close it after the auto close time&lt;/span&gt;
    &lt;span class="cm"&gt;/**
     *! This is a very raw approach!
     *? A better implementation would've been
     *? to batch each snackbar dispatched
     * */&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;snackbar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;open&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;setTimeout&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="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;CLOSE_SNACKBAR&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="nx"&gt;AUTO_CLOSE_SNACKBAR_TIME&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="c1"&gt;// Setting the position and the&lt;/span&gt;
            &lt;span class="c1"&gt;// type from the state&lt;/span&gt;
            &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;`snackbar &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;snackbar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;position&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt;
                &lt;span class="na"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;snackbar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;open&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;flex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;none&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`var(--&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;snackbar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;-bg)`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&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;snackbar&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="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="p"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* Dispatch close snackbar when the close button is clicked */&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;button&lt;/span&gt; &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;CLOSE_SNACKBAR&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;})}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="err"&gt;✖️&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&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;Snackbar&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Usage with Context + Reducer 🦾
&lt;/h2&gt;

&lt;p&gt;In both cases, you'll need to get the dispatch function from the &lt;code&gt;DispatchContext&lt;/code&gt; and call it when you need to use it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Opening a Snackbar
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;OPEN_SNACKBAR&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hello, there!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;success&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bottom-right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Closing a Snackbar
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;CLOSE_SNACKBAR&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Summing It Up
&lt;/h1&gt;

&lt;p&gt;With the combination of the Context and the Reducer Hooks from React, we can create a global state management system that's very similar to Redux. We implemented this system in a snack bar that can be accessed throughout our application.&lt;/p&gt;

</description>
      <category>react</category>
      <category>typescript</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The Life Cycle of Developing a Website 🚴‍♀️</title>
      <dc:creator>Kunal Keshan</dc:creator>
      <pubDate>Fri, 13 Jan 2023 02:32:00 +0000</pubDate>
      <link>https://dev.to/kunalkeshan/the-life-cycle-of-developing-a-website-3pkm</link>
      <guid>https://dev.to/kunalkeshan/the-life-cycle-of-developing-a-website-3pkm</guid>
      <description>&lt;p&gt;As Developers we love jumping to code and working on our ideas immediately. This spontaneity is what helps us learn and explore new things and get better at what we do.&lt;/p&gt;

&lt;p&gt;Sometimes this very spontaneity can lead to frustration when you are working on large projects. When you've used the wrong framework, the incorrect database, or have implemented a feature way too early, or tying to add too many things before actually testing them out.&lt;/p&gt;

&lt;p&gt;Here's a framework that can save you tons of time in your development process.&lt;/p&gt;

&lt;p&gt;For understanding purposes let's take an example of a simple social media application that allows you to put up text posts (something like Twitter).&lt;/p&gt;

&lt;h3&gt;
  
  
  💡 Idea
&lt;/h3&gt;

&lt;p&gt;The Ideation stage is where you get the idea to build a web app. This is where you're the most excited and motivated to make it and get the rush to start on it immediately. But wait! What features will the web app actually have?&lt;/p&gt;

&lt;h3&gt;
  
  
  🔦 Planning the MVP
&lt;/h3&gt;

&lt;p&gt;Considering it's a Twitter-like application, the Minimum Viable Product (MVP) of the app should consist of the following features,&lt;/p&gt;

&lt;p&gt;- A Login and a Signup, with a, forgot password feature&lt;/p&gt;

&lt;p&gt;- User is able to update their profile details&lt;/p&gt;

&lt;p&gt;- Able to make text posts&lt;/p&gt;

&lt;p&gt;- Edit and delete their posts&lt;/p&gt;

&lt;p&gt;- View a feed of posts&lt;/p&gt;

&lt;p&gt;- View posts of other users&lt;/p&gt;

&lt;p&gt;- Follow other users&lt;/p&gt;

&lt;p&gt;This should be enough to get started. The MVP is should consist of just enough features to get your idea up and running. You can always add more later. Your MVP should focus on being good enough, it doesn't have to be perfect.&lt;/p&gt;

&lt;h3&gt;
  
  
  📚 Requirements
&lt;/h3&gt;

&lt;p&gt;In the Requirements phase, you'll plan out what you'll need to implement your MVP. From the tech stack, to how much time you'll need to work on it, will be using a CDN, where you will host the application is all covered here.&lt;/p&gt;

&lt;p&gt;For the social media example, for the front end, we'll use something like Next.js or any other SSR/SSGs-supported framework to facilitate SEO for the user's profile and their posts made. Along with that, we'll use Tailwind CSS for styling.&lt;/p&gt;

&lt;p&gt;A database, preferably a relational one to relate the users and their posts made. The following feature would also be easily implemented with the help of a relational database.&lt;/p&gt;

&lt;p&gt;A backend to build custom endpoints for our application can be built using Node.js / Express.js. We can also implement web sockets using &lt;a href="http://Socket.io" rel="noopener noreferrer"&gt;Socket.io&lt;/a&gt; for real-time feed updates.&lt;/p&gt;

&lt;h3&gt;
  
  
  🎨 Design
&lt;/h3&gt;

&lt;p&gt;The look and feel of the website. Your website's typography, colour scheme, and base styling preferences all come under the Design phase of the application. You can use tools of your preference. Figma and Web Flow are great tools that help in designing and prototyping your website.&lt;/p&gt;

&lt;p&gt;You can always use other platforms like Dribble and Behance for inspiration. 😜&lt;/p&gt;

&lt;h3&gt;
  
  
  💻 Development
&lt;/h3&gt;

&lt;p&gt;This is where the fun begins. With the help of the last four stages, you'll have a clear idea of how to approach your code and even if you get stuck, you can always go back to your plans and get them sorted out quickly.&lt;/p&gt;

&lt;p&gt;You may or may not work in a team, however, it's always best to use a VCS like Git to keep track of your changes and use GitHub if you're working on a team. Keep separate branches for your work and merge them as and when you're done with them.&lt;/p&gt;

&lt;h3&gt;
  
  
  🧪 Testing
&lt;/h3&gt;

&lt;p&gt;Not so fun part for many, but it's one of the most important ones. There are a lot of different types of tests out there, and you should try and cover the ones that are important for your needs.&lt;/p&gt;

&lt;p&gt;If I'm working on the signup feature, I'd preferably create a branch called feat/signup using Git, run tests in that branch, then merge it to the main branch and test it out there one more time with the already existing features.&lt;/p&gt;

&lt;h3&gt;
  
  
  🌐 Deployment
&lt;/h3&gt;

&lt;p&gt;After you're done with the MVP, it's time to make it public and open to access. And to do that, you'll have to deploy your app to the web. For the social media app (I've used Next.js) I'll deploy it using Vercel as of now because I'm not expecting high traffic immediately. I've using PostgreSQL to host my data.&lt;/p&gt;

&lt;p&gt;You've already covered the cost requirements in the Requirements phase here, so it should be pretty much smooth out here.&lt;/p&gt;

&lt;h3&gt;
  
  
  ⚙ Maintenance
&lt;/h3&gt;

&lt;p&gt;Deploying your website is not the end, once you've put it out there, you will have bugs to face, new features to implement and maybe the project really hits off, so you'll need to consider scaling as well.&lt;/p&gt;

&lt;p&gt;At the maintenance phase, you can consider increasing your costs for keeping the app up and running, maybe getting a team to resolve the bugs, or making your application open source and putting those out as issues.&lt;/p&gt;

&lt;h3&gt;
  
  
  🏗 Retirement
&lt;/h3&gt;

&lt;p&gt;Your project has a good run, or maybe it hasn't. The retirement phase, often least or not thought of at all is how you'll take down or stop the project altogether.&lt;/p&gt;

&lt;p&gt;This being a web project, there are usually no costs associated with it. (But it does come in handy for construction projects where you're building a new property and have to take it down later. It can consist of manpower costs, utility costs, etc)&lt;/p&gt;

&lt;p&gt;What flow do you usually follow when you approach building a website? Is there anything that can improve the life cycle mentioned above?&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Learning to Code is a Marathon, not a Race.</title>
      <dc:creator>Kunal Keshan</dc:creator>
      <pubDate>Wed, 28 Dec 2022 05:30:00 +0000</pubDate>
      <link>https://dev.to/kunalkeshan/learning-to-code-is-a-marathon-not-a-race-3e29</link>
      <guid>https://dev.to/kunalkeshan/learning-to-code-is-a-marathon-not-a-race-3e29</guid>
      <description>&lt;p&gt;You may be a student, a working professional or someone who's looking for a career switch, and might be interested in taking up coding to look for better opportunities. Whatever it might be and whatever situation you might be in, there's always an approach that you can take to help you learn better and grow faster.&lt;/p&gt;

&lt;p&gt;I'm currently majoring in Electronics, and I've grown an interest in computer science so much so that I give more time to coding and learning things in computer science than building circuits and learning about electronics.&lt;/p&gt;

&lt;p&gt;I was lucky enough to have mentors and seniors to guide me from the start of my journey in coding, and it helped me immensely to learn a lot in a very short span of time. And, I know that there are many out there who have the interest and the drive to learn, but very less to no guidance at all.&lt;/p&gt;

&lt;p&gt;I'm writing this post to those who I think can find it useful in their coding journey and as a reminder to myself, something to my past self who would've wanted guidance along the way.&lt;/p&gt;

&lt;h1&gt;
  
  
  Understand that there is no hurry in learning things. 🪁
&lt;/h1&gt;

&lt;p&gt;When you're just starting out, there will be so many interesting things that you might come across and sometimes you'll even lose track of time when you get engaged in what you're doing.&lt;/p&gt;

&lt;p&gt;Sometimes some things interest us so much that we dive into them without knowing what we need to have covered beforehand. For example, working in React is a lot better when you have a proper understanding of working with JavaScript.&lt;/p&gt;

&lt;p&gt;You might dive into something advanced just to say that you know how to work with that particular framework or just fill up your resume with those fancy keywords.&lt;/p&gt;

&lt;p&gt;Even if you're a fast learner, you cannot make a fully cooked meal without knowing how to turn on the stove.&lt;/p&gt;

&lt;p&gt;Learning to code in a language comes after learning the fundamental concepts of coding. Once you learn the fundamentals, then you can pick up the syntax of any language.&lt;/p&gt;

&lt;h2&gt;
  
  
  Here's a list of fundamentals that you want to go through before getting into a specific field.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;What is coding?&lt;/li&gt;
&lt;li&gt;Creating algorithms and flowcharts.&lt;/li&gt;
&lt;li&gt;Variables&lt;/li&gt;
&lt;li&gt;Data Types&lt;/li&gt;
&lt;li&gt;Operators&lt;/li&gt;
&lt;li&gt;Conditional Statements&lt;/li&gt;
&lt;li&gt;Iteration (Looping)&lt;/li&gt;
&lt;li&gt;Functions&lt;/li&gt;
&lt;li&gt;Scopes&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Don't just blindly follow the hype. 🏎️
&lt;/h1&gt;

&lt;p&gt;Every few seasons, there's always a talk and hype about a new technology that people say will revolutionize the tech industry. And yes, some of them have actually changed the way we work. From Steve Jobs introducing the iPod, Bluetooth and wireless devices, to the way Jio made it possible to connect all of India to the Internet and right now, the way ChatGPT, an AI giving you the answers to your questions and Lensa creating completely fictional pictures of you.&lt;/p&gt;

&lt;p&gt;There are also things that did start with hype but haven't been the talk of the town for many. Some new technologies like blockchain and web3, while promising still rely on the fundamentals of its predecessor web2 for lots of things.&lt;/p&gt;

&lt;p&gt;If you are taking up coding just because of the hype around it, then you're getting into it for the wrong reasons.&lt;/p&gt;

&lt;p&gt;It might be fun to go along with, but wait for a moment and ask yourself, is it something you really want to work on?&lt;/p&gt;

&lt;p&gt;You might already be doing some coding in AI/ML stuff, but switching it in the middle for some hype out there just because everyone's on it might be more harmful than rewarding.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do your research,&lt;/li&gt;
&lt;li&gt;See what new things you have to learn,&lt;/li&gt;
&lt;li&gt;Look for opportunities,&lt;/li&gt;
&lt;li&gt;Talk with people who've already done something in that field,&lt;/li&gt;
&lt;li&gt;Would it be something that you'll enjoy doing?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before you take the jump into something new, see if it's at a height you're comfortable taking the leap in and always have a fallback plan in case it doesn't work out.&lt;/p&gt;

&lt;h1&gt;
  
  
  Tutorials are useful, but only if you're approaching them actively. 🦾
&lt;/h1&gt;

&lt;p&gt;Tutorials are amazing and show you what you need to get started with a specific topic. And YouTube has no short supply of tutorials, you'll find almost everything that you'll need along with your journey.&lt;/p&gt;

&lt;p&gt;Tutorials are highly specific to a particular topic, meaning it will most of the time cover only what is needed for the scope of that tutorial alone. They don't go much deep into the topic and you'll only have a surface-level understanding of what's happening.&lt;/p&gt;

&lt;p&gt;Other than watching tutorials, you'll want to read the documentation for the technology you'll be learning and work on the technology by yourself in some projects too!&lt;/p&gt;

&lt;p&gt;You can watch someone cook but you cannot get an idea of what they're adding without reading the recipe yourself. At the same time, reading the recipe will give you the theory, but not the practice in the kitchen. You'll need to make the dish numerous times before mastering it.&lt;/p&gt;

&lt;p&gt;Similarly, you'll want to practice and practice and keep asking yourself why some things work the way they do. How you can use it? How you can improve it? And how you can combine it with other concepts that you learnt before.&lt;/p&gt;

&lt;h1&gt;
  
  
  Build, Build, Build! ⚡
&lt;/h1&gt;

&lt;p&gt;Making things by hand is the only way you'll learn how to use them at a later point in time. If you have some idea, regardless of how ridiculous or stupid you might think it is try implementing it by yourself and see where it goes.&lt;/p&gt;

&lt;p&gt;If you have some personal problem and you have an idea for a solution that you can approach using tech, then implement that too. Even if you fail, you'll have learnt a lot of new things in the process, you'll be actively engaging with topics you've never heard of and at the same time, you'll be getting the hands-on experience of working with them.&lt;/p&gt;

&lt;p&gt;At the same time, whatever you've worked on, put it up in GitHub or GitLab as proof of work, even if many might not see it, it's a visual proof of the work you've put in and it's something that will keep you motivated to keep moving forward.&lt;/p&gt;

&lt;h1&gt;
  
  
  Join a Community and create a network. 🫂
&lt;/h1&gt;

&lt;p&gt;Joining a community is probably the greatest thing you can ever do. Be it an online community or one from your own college or locality, you'll have the chance the connect with others programmers too.&lt;/p&gt;

&lt;p&gt;Trying to do everything by yourself will be really tough and put a lot of strain on you, however, having people who are on the same journey as you can boost your morale and help build connections between you and those in the same boat.&lt;/p&gt;

&lt;p&gt;Some benefits of joining a community are&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Access to all groups of people from experts to beginners.&lt;/li&gt;
&lt;li&gt;Access to resources that are approved by a large community.&lt;/li&gt;
&lt;li&gt;Making friends across the globe.&lt;/li&gt;
&lt;li&gt;Creating a network that will definitely help you get projects, clients, and even job opportunities.&lt;/li&gt;
&lt;li&gt;Share your work and get immediate feedback from the people on how you've performed and how you can further improve.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Here are some of the communities that have helped me grow exponentially.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://discord.gg/y82cWZsrv6" rel="noopener noreferrer"&gt;Think-Digital&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.com/invite/7StTjnR" rel="noopener noreferrer"&gt;WebDevSimplified Community&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.gg/tZuexWn9fj" rel="noopener noreferrer"&gt;Kevin Powell - Community&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.gg/hashnode" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Get a mentor for yourself. ✨
&lt;/h1&gt;

&lt;p&gt;Being a part of a community is really great and you can make it even better if you find yourself a mentor. A mentor is someone who is ready to help you reach your goals, guiding you and providing you with the right resources and opportunities as you progress.&lt;/p&gt;

&lt;p&gt;It does not necessarily have to be someone who knows you or someone you know. You can follow the teachings and content of various experts out there, study what they did and try and see if anything works for you as well.&lt;/p&gt;

&lt;p&gt;For me every book I read, the author is a mentor to me. In every video I watch, the speaker becomes a mentor. Anyone from whom you can learn and stick to what they say will also be quite beneficial for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  How can you find a mentor for yourself?
&lt;/h2&gt;

&lt;p&gt;Finding a mentor can take a long time and prove to be a bit difficult. If you want to find yourself a mentor, someone with whom you can speak directly, then try doing the following things&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Search for people in the same field as you on social media platforms like LinkedIn, Twitter and Instagram.&lt;/li&gt;
&lt;li&gt;Take a look at their profile, it will be mentioned that they're ready to guide as a mentor, most of the time and/or they'll even have a history of helping out others.&lt;/li&gt;
&lt;li&gt;Reach out to them either in-app or through email, requesting that you would really appreciate their time if they can help mentor you too. Share your journey with them!&lt;/li&gt;
&lt;li&gt;Keep trying and you'll definitely get a response.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Learn to Unlearn. 📦
&lt;/h1&gt;

&lt;p&gt;Once you learn a concept, it does not end there. You might think of it from one perspective, but when you hear the same thing from someone else, it might sound completely different from what you interpreted and still be right.&lt;/p&gt;

&lt;p&gt;Be open to others' interpretations as well, both of you may be right, and learning from someone else will always benefit you to understand things in a deeper flow than what you did before.&lt;/p&gt;

&lt;p&gt;Even if you're familiar with a concept, you can always come back and learn it from a different perspective. I've seen that when I go back to the fundamentals, I learn some new properties that I didn't even know existed, or some things click again, why they are used at the fundamental level and that helps understand why some advanced concepts work the way they do.&lt;/p&gt;

&lt;p&gt;Learning to unlearn, is something most of us don't want to or will not be willing to do. Why? For most, it can be their ego. "I already know this, so why should I do it again?". Others can be some constraints. "I don't have enough time for this!"&lt;/p&gt;

&lt;p&gt;Whatever dialogue you might be telling yourself, it's not always true. You can always learn something by going back to what you've already learnt. Even if you do not, it will most certainly help enforce your understanding of a particular concept. It's like revising a topic over and over again.&lt;/p&gt;

&lt;h1&gt;
  
  
  Pair Coding. 🧑‍🤝‍🧑
&lt;/h1&gt;

&lt;p&gt;Find someone who you know, your friend, or someone else from a community with whom you've interacted frequently and ask them to pair code with you.&lt;/p&gt;

&lt;p&gt;In pair coding, you and another person will meet up together, either virtually or in person and will work together on the same project or work on your own projects separately. This is really useful in the following ways.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You'll have someone to be accountable to be with other than yourself (your pride gets in the way of not embarrassing yourself in front of someone else)&lt;/li&gt;
&lt;li&gt;The feedback you get is almost immediate.&lt;/li&gt;
&lt;li&gt;A pair of minds are better than a single one. You'll have someone to test your ideas and theories and you can test for someone else too.&lt;/li&gt;
&lt;li&gt;Working on projects becomes fun, you get to work together and work in a flow building it quickly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When I started out coding, I had &lt;a href="https://www.linkedin.com/in/surendar-pd-b725921b1/" rel="noopener noreferrer"&gt;Surendar PD&lt;/a&gt; as my coding buddy. I knew him back from school, and we bonded the most when we started meeting each other to code and create projects and that was after school ended.&lt;/p&gt;

&lt;h1&gt;
  
  
  You're not an imposter. 🙅‍♂️
&lt;/h1&gt;

&lt;p&gt;When you're learning something new, you're stepping out of your comfort zone. This can churn up a lot of feelings, especially those of fear because for the most part, you'll not understand some things and that's completely alright.&lt;/p&gt;

&lt;p&gt;You might also feel like what you're doing and what you're learning might be a waste of time. Or even that you're not the right person to do it. These thoughts and feelings might seem so real and valid, but trust me they aren't!&lt;/p&gt;

&lt;p&gt;When you're stepping out of your comfort zone, you also get something known as imposter syndrome. It's usually the negative voice that tells you all the bad stuff that might happen if you keep going. It keeps telling your that you're an imposter, that you're a fake for doing things you've never done.&lt;/p&gt;

&lt;p&gt;It's tough not giving in to it. I still face it every time I learn something or when I try to teach something that I'm familiar with. Here are some tips that I found useful for not giving in to my imposter voices,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Look back at your journey and see how far you've come. Often the voice tells you to give up and that you've reached your limit. Stop and take a moment to see how much progress you've made and appreciate yourself for it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Write down these thoughts and challenge them. Just because it's a thought or because you feel like it, it doesn't mean it's real. When you write down these thoughts, they will seem ridiculous the moment you read them and if not, you can always question them for their validity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ask for help. Never hesitate to ask for help from your friends, your mentors and guides. They've most certainly gone through it themselves and can help you understand where your worries and disbeliefs stem from.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Resources that helped me level up. 🚀
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Websites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/" rel="noopener noreferrer"&gt;MDN Documentation&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.w3schools.com/" rel="noopener noreferrer"&gt;W3Schools&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.freecodecamp.org/learn" rel="noopener noreferrer"&gt;Free Code Camp&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.theodinproject.com/" rel="noopener noreferrer"&gt;The Odin Project&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  YouTube Channels
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/@TraversyMedia" rel="noopener noreferrer"&gt;Traversy Media&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/@WebDevSimplified" rel="noopener noreferrer"&gt;Web Dev Simplified&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/@KevinPowell" rel="noopener noreferrer"&gt;Kevin Powell&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/@NetNinja" rel="noopener noreferrer"&gt;The Net Ninja&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Share what you learn, so others can learn from you. 📚
&lt;/h1&gt;

&lt;p&gt;Just because you're a beginner or someone learning something new, that doesn't mean you can't talk about it. When you're learning something new, write or record videos about what you learnt and publish it in public.&lt;/p&gt;

&lt;p&gt;Sure you might not have much interaction with what you share. And you might also get some critical comments. However, sharing what you learn can be more beneficial than you think.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It helps enforce what you just learnt.&lt;/li&gt;
&lt;li&gt;What you share is proof of work. It shows that you're doing things and putting in the effort.&lt;/li&gt;
&lt;li&gt;It might help someone who's just starting out learn other things from you.
&lt;/li&gt;
&lt;li&gt;You become a guide and mentor for others the more you share what you learn.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>emptystring</category>
    </item>
    <item>
      <title>My Journey in Web Development - Dev Retro 2022.</title>
      <dc:creator>Kunal Keshan</dc:creator>
      <pubDate>Sun, 18 Dec 2022 23:59:08 +0000</pubDate>
      <link>https://dev.to/kunalkeshan/my-journey-in-web-development-dev-retro-2022-22ei</link>
      <guid>https://dev.to/kunalkeshan/my-journey-in-web-development-dev-retro-2022-22ei</guid>
      <description>&lt;p&gt;It's been close to 2 years since I started my journey in Web Development. Just like everyone I started off with learning the basics and slowly out of curiosity learnt some of the advanced stuff.&lt;/p&gt;

&lt;p&gt;Last year, I spent most of my time mastering the fundamentals down to the core. And I was lucky enough to be part of &lt;a href="https://www.think-digital.in/" rel="noopener noreferrer"&gt;Think-Digital&lt;/a&gt;, a community for students to upskill themselves with the support of mentors.&lt;/p&gt;

&lt;p&gt;Without &lt;a href="https://www.linkedin.com/in/mohammad-muazam-129838190/" rel="noopener noreferrer"&gt;Muazam&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/harshit-raj-2000/" rel="noopener noreferrer"&gt;Harshit&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/avichal-gupta/" rel="noopener noreferrer"&gt;Avichal&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/arindam-lahiri/" rel="noopener noreferrer"&gt;Arindam&lt;/a&gt; bhaiyas help, I wouldn't have been able to reach where I am today, they helped me to master the basics by guiding me and the team to learn consistently, build projects and always be open to asking doubts without any hesitation. We had fun times building projects together, playing small development games like &lt;a href="https://cssbattle.dev" rel="noopener noreferrer"&gt;https://cssbattle.dev&lt;/a&gt;, mini hackathons and stuff that kept learning web development fun. Thank you bhaiyas for taking teaching us with all your effort. 🥺&lt;/p&gt;

&lt;p&gt;✅ Learnt the fundamentals of Web Development.&lt;/p&gt;

&lt;p&gt;✅ Understood how to work from front end to back end.&lt;/p&gt;

&lt;p&gt;✅ Built a full-stack project, similar to Instagram, just instead of photos, you post with text.&lt;/p&gt;

&lt;p&gt;🔗 Practice Projects I worked on: &lt;a href="https://github.com/kunalkeshan/ThinkDigitalPracticeProjects" rel="noopener noreferrer"&gt;https://github.com/kunalkeshan/ThinkDigitalPracticeProjects&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔗 Full-Stack Project: &lt;a href="https://github.com/kunalkeshan/thinkdigital" rel="noopener noreferrer"&gt;https://github.com/kunalkeshan/thinkdigital&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the same year (2021) I was given the vice lead position at &lt;a href="https://www.think-digital.in/" rel="noopener noreferrer"&gt;Think-Digital&lt;/a&gt; and the opportunity to lead the team. I too focused on sharing what I knew with the new recruits.&lt;/p&gt;

&lt;p&gt;✅ This gave me the chance to get out of my fear of public speaking,&lt;/p&gt;

&lt;p&gt;✅ understand the importance of preparation before taking up a talk,&lt;/p&gt;

&lt;p&gt;✅ get more confident and&lt;/p&gt;

&lt;p&gt;✅ explore things about web development even further.&lt;/p&gt;

&lt;p&gt;🔗 Internal Sessions Timeline: &lt;a href="https://kunal-keshan.notion.site/TD-Web-Development-Roadmap-September-Recruits-2021-14ca7919fa6a4d4abd137ce7bc695f80" rel="noopener noreferrer"&gt;https://kunal-keshan.notion.site/TD-Web-Development-Roadmap-September-Recruits-2021-14ca7919fa6a4d4abd137ce7bc695f80&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔗 Internal Sessions Playlist: &lt;a href="https://youtube.com/playlist?list=PLolW4AaQgQKHMPHw3Xo3KxVQUterEaEwr" rel="noopener noreferrer"&gt;https://youtube.com/playlist?list=PLolW4AaQgQKHMPHw3Xo3KxVQUterEaEwr&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔗 Think-Digital's First WPS: &lt;a href="https://youtube.com/playlist?list=PLolW4AaQgQKGr9FWGy1Ko-AWijmNBxJ1N" rel="noopener noreferrer"&gt;https://youtube.com/playlist?list=PLolW4AaQgQKGr9FWGy1Ko-AWijmNBxJ1N&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F3l4szj063i10ikfz0v4d.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F3l4szj063i10ikfz0v4d.jpg" alt="Atom and internal sessions by Kunal Keshan Image" width="800" height="799"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I made sure we had the weekly sessions of learning and development projects, and in all the flow, I did miss out on one thing, to be honest, I shared my knowledge and did learn a lot of new things, but didn't focus much on building much of a team.&lt;/p&gt;

&lt;p&gt;This did cause the team to become stale. There are only less than 4-5 active members towards the end of the sessions. I still do think what I could have done differently here that would have helped me keep the team active. Would appreciate any advice I can get here.&lt;/p&gt;

&lt;p&gt;Being a part of &lt;a href="https://www.think-digital.in/" rel="noopener noreferrer"&gt;Think-Digital&lt;/a&gt; also gave me the opportunity to work on external projects that involved using advanced tech stacks like React, and MongoDB and also work with no-code tools like WordPress under the guidance of &lt;a href="https://gsthina.me/" rel="noopener noreferrer"&gt;Thina&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/gauravprasadgp/" rel="noopener noreferrer"&gt;Gaurav&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/mohammad-muazam-129838190/" rel="noopener noreferrer"&gt;Muazam&lt;/a&gt; bhaiya.&lt;/p&gt;

&lt;p&gt;✅ Helped build Atom&lt;/p&gt;

&lt;p&gt;✅ Learnt a bit about integrating ML Algorithms to a backend application written in Node.js&lt;/p&gt;

&lt;p&gt;✅ Worked on external projects that involved WordPress.&lt;/p&gt;

&lt;p&gt;🔗 Atom Portal: &lt;a href="https://atom.think-digital.in/" rel="noopener noreferrer"&gt;https://atom.think-digital.in/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I was then promoted to the lead of the Web Domain at &lt;a href="https://www.think-digital.in/" rel="noopener noreferrer"&gt;Think-Digital&lt;/a&gt;. This time I tried to do activities that would help the team collaborate and become more active. So I thought of projects that we could work on as a team and also conducted an event in which the full team took part.&lt;/p&gt;

&lt;p&gt;"Web Dev Week" was a week-long event of knowledge exchange on both technical and non-technical topics. All the members of the Web Team were involved here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fnjm7ibmr2fl9ey15jo5k.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fnjm7ibmr2fl9ey15jo5k.jpg" alt="Web Dev Week by Kunal Keshan" width="800" height="798"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fast forward to this year (2022), it was a joy ride in itself in terms of my development journey. I joined the IEEE team at SRM and met some of the most amazing seniors &lt;a href="https://www.linkedin.com/in/shauryabhandari/" rel="noopener noreferrer"&gt;Shaurya&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/maw1a/" rel="noopener noreferrer"&gt;Mawia&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/kaushikkums/" rel="noopener noreferrer"&gt;Kaushik&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/snehilcodes/" rel="noopener noreferrer"&gt;Snehil&lt;/a&gt; bhaiya from college.&lt;/p&gt;

&lt;p&gt;All of them are awesome and polished developers who were literally on another level and learning from them, even in a single conversation with them, you'll end up hearing about something you've never worked on before.&lt;/p&gt;

&lt;p&gt;At the beginning of 2022, I focused my time on learning more about frontend frameworks, specifically with React and &lt;a href="https://www.linkedin.com/in/snehilcodes/" rel="noopener noreferrer"&gt;Snehil&lt;/a&gt; bhaiya was a huge support here. Learnt the fundamentals, and build a lot of projects with it just to get the hang of working with React. ⚛️&lt;/p&gt;

&lt;p&gt;Further started exploring Backend development with Node.js and Express, built fun APIs and learnt a bit about Web Scraping here. Joining teams in colleges like &lt;a href="https://www.linkedin.com/company/srmpedia/" rel="noopener noreferrer"&gt;SRMPedia&lt;/a&gt; did give me a bit of exposure to new development tools.&lt;/p&gt;

&lt;p&gt;As I progressed, I figured out that I was more into Backend Development and continued exploring that field event more. I even did a #100DaysOfCoding challenge to push myself to learn something about development for 3 months straight.&lt;/p&gt;

&lt;p&gt;Got my first internship at &lt;a href="https://www.linkedin.com/company/blackwins-tech/" rel="noopener noreferrer"&gt;Blackwins Tech Solution&lt;/a&gt; as a frontend developer with &lt;a href="https://www.linkedin.com/in/mohammad-muazam-129838190/" rel="noopener noreferrer"&gt;Muazam&lt;/a&gt; bhaiyas referral. Working here was something entirely different, as we were working as a team, with tight deadlines and some of the features required were really advanced to me. With the help of &lt;a href="https://www.linkedin.com/in/lavanya-seetharaman-b5667a4a/" rel="noopener noreferrer"&gt;Lavanya&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/rajmohan-ramachandran-339b77102/" rel="noopener noreferrer"&gt;Rajmohan&lt;/a&gt;, who came to impromptu meetups I was able to get the work done most of the time. 😅 Thanks for your patience with me &lt;a href="https://www.linkedin.com/company/blackwins-tech/" rel="noopener noreferrer"&gt;Blackwins&lt;/a&gt; Team.&lt;/p&gt;

&lt;p&gt;✅ Learnt advanced React concepts, working with hooks and global state management using Redux.&lt;/p&gt;

&lt;p&gt;✅ Introduced to Docker for the first time.&lt;/p&gt;

&lt;p&gt;✅ Introduced to the concept of microservices.&lt;/p&gt;

&lt;p&gt;✅ Understanding the flow of a really large backend application and its integration with multiple front-end clients.&lt;/p&gt;

&lt;p&gt;Go the opportunity to take up the "Webture" Bootcamp on full-stack development, by IEEE SRM. I spoke more specifically on back-end development, about Node.js, Express.js, and MongoDB and built a Rest API that allows CRUD operation on an article-type database. The audience was over 200+ and the rush I had was really high.&lt;/p&gt;

&lt;p&gt;In the beginning, I did struggle and stammer a bit, and with the flow of time, I was able to speak more comfortably with a large audience. This event helped me get more comfortable with a live audience, compared to the online sessions I used to do this was totally different.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fmxzklslnx04fd3o1p28v.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fmxzklslnx04fd3o1p28v.jpg" alt="Webture Bootcamp, session by Kunal Keshan" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Moving forward, I wanted to use the skills I've gained as a web developer to give back to the student community. And something I learnt along the way was to create projects that solve a problem that you've faced rather than creating projects just for the sake of your resume. Thanks to &lt;a href="https://www.linkedin.com/in/avichal-gupta/" rel="noopener noreferrer"&gt;Avichal&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/arindam-lahiri/" rel="noopener noreferrer"&gt;Arindam&lt;/a&gt; bhaiyas insight above I created two projects that I believe do help the student community.&lt;/p&gt;

&lt;p&gt;📚 ECE Notes Initiative: &lt;a href="https://notes.kunalkeshan.dev/" rel="noopener noreferrer"&gt;https://notes.kunalkeshan.dev/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🖇️ Shiryoku (Resources): &lt;a href="https://resources.kunalkeshan.dev/" rel="noopener noreferrer"&gt;https://resources.kunalkeshan.dev/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fqi2hqtsdkic7xoe58j5f.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fqi2hqtsdkic7xoe58j5f.jpg" alt="ECE Notes Initiative and Shiryoku by Kunal Keshan" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This in turn fueled my curiosity in Open-Source development and I've been or at least tried to be a paragon of Open-Source in my college. Creating awareness and getting people involved have been one of my goals ever since.&lt;/p&gt;

&lt;p&gt;Toward the end of this year, with &lt;a href="https://www.linkedin.com/in/kaushikkums/" rel="noopener noreferrer"&gt;Kaushik&lt;/a&gt; bhaiyas help and support, I was able to start exploring TypeScript and create simple frontend projects to the backend as well. I've even written the code for Shiryoku in TypeScript as well. And at the moment, I've become a fan of working with TypeScript. 😍 I've said it before and said it again, once you start using TypeScript there is no going back to JavaScript.&lt;/p&gt;

&lt;p&gt;Currently, I'm exploring Next.js and also building projects with it as a part of Rentyaar and IEEE SRM.&lt;/p&gt;

&lt;p&gt;The people I've been with have always been supportive of my work, I see myself as one of the lucky few who got the chance to get the right mentors and the right companions to learn from and learn along.&lt;/p&gt;

&lt;p&gt;My friends &lt;a href="https://www.linkedin.com/in/surendar-pd-b725921b1/" rel="noopener noreferrer"&gt;Surendar&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/jayanth-srinivasan-13b07521b/" rel="noopener noreferrer"&gt;Jayanth&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/jaswin-anand-67a86123a/" rel="noopener noreferrer"&gt;Jaswin&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/kumar-srivathsan-2221a7219/" rel="noopener noreferrer"&gt;Kumar&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/vedant-bhargava-252ab6200/" rel="noopener noreferrer"&gt;Vedant&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/himanshu-thakurrr/" rel="noopener noreferrer"&gt;Himanshu&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/kumarrohan9724/" rel="noopener noreferrer"&gt;Rohan&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/raman-shekhawat-1013381ba/" rel="noopener noreferrer"&gt;Raman&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/sangammishraa/" rel="noopener noreferrer"&gt;Sangam&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/ganni-likhit-396296201/" rel="noopener noreferrer"&gt;Likhit&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/aman-singh-141026225/" rel="noopener noreferrer"&gt;Aman&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/yakub-mathew-7169621b6/" rel="noopener noreferrer"&gt;Yakub&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/ritveek-rana-095a5a1a4/" rel="noopener noreferrer"&gt;Ritveek&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/gopalakrishnan-v-s-a23510206/" rel="noopener noreferrer"&gt;Vivek&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/s-surya-prakash-65a28b200/" rel="noopener noreferrer"&gt;Surya&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/krishna-chaitanya-thota-b77b0a220/" rel="noopener noreferrer"&gt;Krishna&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/disha-yadav-bb5478221/" rel="noopener noreferrer"&gt;Disha&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/priyanshi-pusan/" rel="noopener noreferrer"&gt;Priyanshi&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/itaintkevin/" rel="noopener noreferrer"&gt;Kevin&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/arnavshukla/" rel="noopener noreferrer"&gt;Arnav&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/adityacse/" rel="noopener noreferrer"&gt;Aditya&lt;/a&gt;, and &lt;a href="https://www.linkedin.com/in/imkartik/" rel="noopener noreferrer"&gt;Kartik&lt;/a&gt; who have been great motivators and amazing at the feedback that they give has helped me a lot in the journey here. There are many names that I couldn't add here, but thanks to everyone who's helped me reach where I'm today. 🤗&lt;/p&gt;

&lt;p&gt;Looking forward to learning and growing more this coming year. Cheers. 🍻&lt;/p&gt;

</description>
      <category>emptystring</category>
    </item>
    <item>
      <title>20 Lessons in 20 Years.</title>
      <dc:creator>Kunal Keshan</dc:creator>
      <pubDate>Sun, 11 Dec 2022 14:20:27 +0000</pubDate>
      <link>https://dev.to/kunalkeshan/20-lessons-in-20-years-3hcg</link>
      <guid>https://dev.to/kunalkeshan/20-lessons-in-20-years-3hcg</guid>
      <description>&lt;p&gt;Yesterday, I turned 20 years old. And it feels just like any other day out there. Although I wouldn't be here if it were for the people around me and how much they've helped me grow, especially in the past 2 years of my life.&lt;/p&gt;

&lt;p&gt;Recently I have changed my perspective on birthdays, after reading an article shared by &lt;a href="https://gsthina.me"&gt;GS Thina&lt;/a&gt;, on how your birthdays are not only to celebrate another year of your life but also for the sacrifices, pain and struggle your parents have made for you. It is because of them that I am here today, getting to experience things I've never thought of, and meeting people who inspire me every day and a lot more.&lt;/p&gt;

&lt;p&gt;Here are some lessons I've learnt in the past 20 years, most of which I've only picked up in the past two years of joining college. And I'm not a perfect example of following all of these, there are times when I do feel lost and unsure what to do, and coming back these lessons act as a compass in the times when the sky is dark.&lt;/p&gt;

&lt;p&gt;0️⃣1️⃣ Find the right mentors early on. Getting a mentor for yourself in life or any specific field that you're looking forward to improving on can change the game altogether. It can accelerate your growth exponentially and help you become well-versed and equipped for what's to come. I was lucky enough to get the opportunity to have mentors accessible to me at an early stage in my college life through Think-Digital.&lt;/p&gt;

&lt;p&gt;0️⃣2️⃣ Motivation alone is not enough. You need consistency and hard work to achieve the goals that you want. You need to be willing to put in the effort day in and day out too, even showing up for 5 mins daily makes a whole lot of difference in the long run.&lt;/p&gt;

&lt;p&gt;0️⃣3️⃣ What got you here, will not get you there. You might have made a lot of effort in changing yourself and how you work for the good, and that's really great. However, if you get stuck in the old ways, you'll not move forward and achieve what you're meant to. Being willing to change your beliefs and thoughts is not a bad thing, it's a superpower that will help you break your limits.&lt;/p&gt;

&lt;p&gt;0️⃣4️⃣ You create your own opportunities. Be impatient with your actions and patient with your results and you'll find that you'll get opportunities much more frequently and also those that give good returns also.&lt;/p&gt;

&lt;p&gt;0️⃣5️⃣ Keep your expectations low. Even after the hard work you might've put in, things might not always play out the way you think they should. There will be failures and lessons along with them, learn to accept and learn and move on.&lt;/p&gt;

&lt;p&gt;0️⃣6️⃣ Nobody is obliged to return you the favour. Just because you helped someone, it doesn't mean that they're also obliged to do the same to you. It doesn't always work that way. Focus on how you can add value and give to others without thinking much about what you'll get in return. Do things out of the good of your heart, not for the exchange that you might get.&lt;/p&gt;

&lt;p&gt;0️⃣7️⃣ Appreciate the little things. Despite coming from a privileged family, I've just recently started to appreciate the little things that I have. Having a roof over your head, getting full three meals a day, getting to go to college, having a place to stay with all the comfort that you need, these might sound common, but these little things are what keep me going.&lt;/p&gt;

&lt;p&gt;0️⃣8️⃣ Take small and calculated risks. Sometimes it's important to take that chance that you might feel scared of, you never know what's on the other side once you're done with it.&lt;/p&gt;

&lt;p&gt;0️⃣9️⃣ Early in your days of exploring, say YES as much as possible. When you're learning something new, and you get an opportunity to work, learn or attended some event related to what you're exploring say yes to it. Even if it inconveniences you in the beginning, this is a great way to learn and grow as fast as possible. It will also help you understand what's out there in the field that you still need to get a touch of.&lt;/p&gt;

&lt;p&gt;1️⃣0️⃣ Learn to say NO. Contrary to the first one 😅. Sometimes, you just have to say NO, to those external events that you know will have no value to you. You know what's best for you, even if it's a tough one, it will also be the right one.&lt;/p&gt;

&lt;p&gt;1️⃣1️⃣ Explore as much as you can before you find what's right for you. I remember in the first year of my college, I was learning how to write a blog, learning about the stock market and trading (lost of bit of money here 😭), graphic designing and video editing (these come in handy right now when I'm making content), making music, then coding specifically web development. It's in web dev where it all clicked with me, something that I'm really interested in and is really enjoyable, whenever I work on web dev projects I feel fun and I'm unable to stop. You gotta explore whatever you can out there to find what makes you happy.&lt;/p&gt;

&lt;p&gt;1️⃣2️⃣ Hard choices, Easy Life. Easy choices. Hard Life. Being disciplined about your plans to achieve your goals makes the difference between the achiever and the perfectionist. Doing the hard work now will definitely make a difference at a later point in life. Having a long-term mindset will definitely help you take actions now which are more oriented towards your goals.&lt;/p&gt;

&lt;p&gt;1️⃣3️⃣ Surround yourself with people with similar goals. Be it your friends, your seniors or even people who've already achieved what you're looking for. They will give you insights on how you can reach their level and in every conversation you have with them you'll always learn something new.&lt;/p&gt;

&lt;p&gt;1️⃣4️⃣ Have different circles for different purposes. Extending on the previous point. Sure, working hard is really important, but all work and no play makes life monotonous and you'll eventually get burnt out. It's better to have different circles, one for learning and growing, others for having fun, some with whom you do business, but don't get stuck up on boundaries, you're always free to share what you want with whom. For me, this helps me switch up my mood, and not get distracted by things that are not meant to enter the circle.&lt;/p&gt;

&lt;p&gt;1️⃣5️⃣ Even if you find something you're passionate about, don't stop exploring. After exploring web development, I kinda stopped exploring other fields, and to be honest, this was one of the reasons why I kept burning out, exploring some new things helped me get out of a rut, learn new things and get a clearer perspective.&lt;/p&gt;

&lt;p&gt;1️⃣6️⃣ It's okay to feel bored and tired of things you may be passionate about. We're all human and at the end of the day, you can only do so much. You might be putting in all the effort, day in and day out, and that's really great. At the same time, it's also important to take breaks and focus on yourself, get the proper rest that you need before you feel reinvigorated to go back to the things that you're passionate about.&lt;/p&gt;

&lt;p&gt;1️⃣7️⃣ Pen + Paper &amp;gt;&amp;gt;&amp;gt;&amp;gt; Any other productivity tool. I've tried so many productivity tools out there, and have realized that nothing beats the feel and flow that pen and paper give you. Using pen and paper gives you the freedom to express your ideas without any restraint, gives you a good flow and overall, there's no distraction when working with those.&lt;/p&gt;

&lt;p&gt;1️⃣8️⃣ Learn finance and budget early on. Knowing the basic financial terms and flows will help you make better financial decisions. In college, you might think that they're not much required, but if you start early on, you'll be surprised at how much finance plays a role even while you're a student. Learn to invest early on, do your research and make budget plans for how you want to spend your pocket money or stipend from some internship.&lt;/p&gt;

&lt;p&gt;1️⃣9️⃣ Have someone to speak to. Be it your friend, your siblings, or your parents, have someone with whom you can express your problems and troubles to. Someone who you trust and who will listen to you without any judgement. Bottling up your emotions might help in the short term, but you'll not benefit from it in the long run, having someone to talk to helps your clear your mind, and express your needs and what you're feeling.&lt;/p&gt;

&lt;p&gt;2️⃣0️⃣ Be proactive about your habits. In the book Atomic habits, &lt;a href="https://jamesclear.com/"&gt;James Clear&lt;/a&gt; said, "Habits are a double-edged sword, they will either make you or break you". Some bad habits may limit you, but they can definitely be changed or diminished, and you can definitely build good habits with the right system and mindset.&lt;/p&gt;

&lt;p&gt;These are some lessons I've learnt over the past few years, most recent and still serve as a good guide to keeping me in check. Cheers and thanks for reading. Here's to another year of exploring, learning and interacting with new people who might come along on the journey. 🍻&lt;/p&gt;

</description>
      <category>personaldevelopment</category>
      <category>growth</category>
      <category>learning</category>
      <category>experience</category>
    </item>
    <item>
      <title>How and Where to contribute to the ECE Notes Project?</title>
      <dc:creator>Kunal Keshan</dc:creator>
      <pubDate>Sun, 28 Aug 2022 04:13:00 +0000</pubDate>
      <link>https://dev.to/kunalkeshan/how-and-where-to-contribute-to-the-ece-notes-project-25ba</link>
      <guid>https://dev.to/kunalkeshan/how-and-where-to-contribute-to-the-ece-notes-project-25ba</guid>
      <description>&lt;p&gt;The project is live and open for anyone to contribute to. Ever since the project went live, I’ve made various pieces of information on how anyone can contribute to the project efficiently, but I’ve missed out on where to contribute to!&lt;/p&gt;

&lt;p&gt;A contribution request or an issue is as simple as noticing that there are some pieces of the project that are missing or are not in sync with each other.&lt;/p&gt;

&lt;p&gt;All that’s needed to be done, is to open an issue in the GitHub project about what’s missing, with the appropriate title and description and someone will have a look at it. This is given that you don’t have the notes currently with you and are in need of it.&lt;/p&gt;

&lt;p&gt;For a more detailed approach check out this video.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/-5h0DQCA5Go"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;If you have some notes, but don’t know how to contribute using GitHub, you can check out this playlist where I guide you on how to create a fork, upload your notes and open a pull request.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.youtube.com/playlist?list=PLevNch38Bx4FTPFRpq9pppJzDsPZs7h2Z" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--UdU4FzRV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.ytimg.com/vi/MXQHmyAopmI/hqdefault.jpg%3Fsqp%3D-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ%3D%3D%26rs%3DAOn4CLBtukaQcS9U66CwDOcP-clWrOTt0A%26days_since_epoch%3D19736" height="94" class="m-0" width="168"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.youtube.com/playlist?list=PLevNch38Bx4FTPFRpq9pppJzDsPZs7h2Z" rel="noopener noreferrer" class="c-link"&gt;
          
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Collection of all notes of SRMIST B. Tech Electronics and Communications Dept. for the academic year: 2020-24. Visit the Repository or Drive to access all no...
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--kXusvf9t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.youtube.com/s/desktop/7197d3dc/img/favicon.ico" width="16" height="16"&gt;
        youtube.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;If you’re not up to using GitHub, then you can fill out the form below, with the drive links to your notes, and I’ll help you add them to the project from my end.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://docs.google.com/forms/d/e/1FAIpQLScLP-IuLXmJvvYZMM8gXSOJIl7yI8IoqBir3xtQ2WLKwYxM6g/viewform?usp=send_form" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--N0VvyiYm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh4.googleusercontent.com/fPE0d6RzqCqag0nsMKGORcZCEmoSCPuWHJxdoRSZlGw1sdT2CfRXewFuuU9Dvghlfy2eIv8or_g%3Dw1200-h630-p" height="420" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://docs.google.com/forms/d/e/1FAIpQLScLP-IuLXmJvvYZMM8gXSOJIl7yI8IoqBir3xtQ2WLKwYxM6g/viewform?usp=send_form" rel="noopener noreferrer" class="c-link"&gt;
          Contribute to the ECE Notes Project
        &lt;/a&gt;
      &lt;/h2&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--lI2yCN4Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://ssl.gstatic.com/docs/spreadsheets/forms/favicon_qp2.png" width="16" height="16"&gt;
        docs.google.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;





&lt;p&gt;Here are some other articles I've written that you will interested in:&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/kunalkeshan" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jh_2Ln13--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--oLCv11_P--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/731250/86385527-3a87-4728-86e8-41711975bf31.png" alt="kunalkeshan"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/kunalkeshan/the-best-collection-of-ece-notes-youll-ever-find-5e5d" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;The best collection of ECE Notes you'll ever find!&lt;/h2&gt;
      &lt;h3&gt;Kunal Keshan ・ Aug 1 '22&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#ece&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#btech&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#srmist&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#notes&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;



&lt;div class="ltag__link"&gt;
  &lt;a href="/kunalkeshan" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jh_2Ln13--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--oLCv11_P--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/731250/86385527-3a87-4728-86e8-41711975bf31.png" alt="kunalkeshan"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/kunalkeshan/should-i-learn-wordpress-or-full-stack-development-23fp" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Should I learn WordPress or Full-Stack Development?&lt;/h2&gt;
      &lt;h3&gt;Kunal Keshan ・ Jun 13 '22&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#wordpress&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#discuss&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;





&lt;h2&gt;
  
  
  Who am I?
&lt;/h2&gt;

&lt;p&gt;I’m Kunal Keshan, currently, a student at SRMIST, KTR, pursuing Electronics and Communication Engineering. I have a passion for Computer Science and Development and have been exploring it for a while now. I’m far from an expert and I’m always eager to learn something new.&lt;/p&gt;

&lt;p&gt;Here are my profile links if you’re interested in connecting!&lt;/p&gt;

&lt;p&gt;Instagram: &lt;a href="https://www.instagram.com/kunalkeshan/"&gt;https://www.instagram.com/kunalkeshan/&lt;/a&gt;&lt;br&gt;
LinkedIn: &lt;a href="https://www.linkedin.com/in/kunalkeshan/"&gt;https://www.linkedin.com/in/kunalkeshan/&lt;/a&gt;&lt;br&gt;
Twitter: &lt;a href="https://twitter.com/_kunalkeshan_"&gt;https://twitter.com/_kunalkeshan_&lt;/a&gt;&lt;br&gt;
GitHub: &lt;a href="https://github.com/kunalkeshan"&gt;https://github.com/kunalkeshan&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ece</category>
      <category>srmist</category>
      <category>btech</category>
      <category>github</category>
    </item>
    <item>
      <title>The best collection of ECE Notes you'll ever find!</title>
      <dc:creator>Kunal Keshan</dc:creator>
      <pubDate>Mon, 01 Aug 2022 01:52:59 +0000</pubDate>
      <link>https://dev.to/kunalkeshan/the-best-collection-of-ece-notes-youll-ever-find-5e5d</link>
      <guid>https://dev.to/kunalkeshan/the-best-collection-of-ece-notes-youll-ever-find-5e5d</guid>
      <description>&lt;p&gt;Are you a student pursuing your Undergraduate Bachelors in Electronics and Communications Engineering? &lt;br&gt;
Have you been facing difficulty with accessing notes and study material to prepare for your exam?&lt;br&gt;
I've faced the same problem as well. And to solve it, I made the &lt;a href="https://notes.kunalkeshan.dev/?utm_medium=social&amp;amp;utm_source=dev.to"&gt;ECE Notes Project&lt;/a&gt; and it's something you don't want to miss out!&lt;/p&gt;
&lt;h2&gt;
  
  
  What is this Project about?
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;SRMIST B.Tech ECE Notes&lt;/strong&gt; Project is an Open Source collection of all ECE Notes for the Academic Year 2020-24. It includes, notes, text books, lab notes, and study guides for all subjects taken for the ECE Curriculum.&lt;/p&gt;

&lt;p&gt;You can access the GitHub Repository to the notes here:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A9-wwsHG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/kunalkeshan"&gt;
        kunalkeshan
      &lt;/a&gt; / &lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24"&gt;
        SRMIST-B.Tech-ECE-Notes-2022-24
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Collection of all B.Tech ECE Notes for the academic year 2020-24.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
B.Tech ECE Notes&lt;/h1&gt;
&lt;p&gt;
  &lt;a rel="noopener noreferrer" href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24/assets/thumbnail.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J-Ld4OXC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24/assets/thumbnail.png" alt="SRMIST B. Tech ECE Notes" width="60%" height="auto"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Collection of all B.Tech ECE Notes for the academic year 2022-24. Read below for further insight on subjects for Each Semester.&lt;/p&gt;

&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/b177f5222701a662fac839638764aeb73e2dd4c605cb3245b64ad3dc5adbd203/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6b756e616c6b657368616e2f53524d4953542d422e546563682d4543452d4e6f7465732d323032322d32343f7374796c653d736f6369616c"&gt;&lt;img src="https://camo.githubusercontent.com/b177f5222701a662fac839638764aeb73e2dd4c605cb3245b64ad3dc5adbd203/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6b756e616c6b657368616e2f53524d4953542d422e546563682d4543452d4e6f7465732d323032322d32343f7374796c653d736f6369616c" alt="GitHub forks"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/692d087cde40fbecf5b745379909cc8186b6aa07c3793957c8111fb6aa49d898/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6b756e616c6b657368616e2f53524d4953542d422e546563682d4543452d4e6f7465732d323032322d32343f7374796c653d736f6369616c"&gt;&lt;img src="https://camo.githubusercontent.com/692d087cde40fbecf5b745379909cc8186b6aa07c3793957c8111fb6aa49d898/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6b756e616c6b657368616e2f53524d4953542d422e546563682d4543452d4e6f7465732d323032322d32343f7374796c653d736f6369616c" alt="GitHub Repo stars"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/f4ec0159e9fef9de6b6ea1cfbef5e90821f69b0ddd9de2b283ca5e78ab25af6c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f77617463686572732f6b756e616c6b657368616e2f53524d4953542d422e546563682d4543452d4e6f7465732d323032322d32343f7374796c653d736f6369616c"&gt;&lt;img src="https://camo.githubusercontent.com/f4ec0159e9fef9de6b6ea1cfbef5e90821f69b0ddd9de2b283ca5e78ab25af6c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f77617463686572732f6b756e616c6b657368616e2f53524d4953542d422e546563682d4543452d4e6f7465732d323032322d32343f7374796c653d736f6369616c" alt="GitHub watchers"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://drive.google.com/drive/folders/191lQV0by-ZBqPv0gQHhT8F9vKCgQuq2X?usp=sharing" rel="nofollow"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9XPK7Vka--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24/assets/drive-card.jpg" alt="Download notes from Drive" width="300px" height="80px"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Large Documents are present in the above drive as GitHub only offers 25mb max per document.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://notes.kunalkeshan.dev?utm_source=github.com&amp;amp;utm_medium=social" rel="nofollow"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--psbjVS9c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24/assets/website-card.jpg" alt="Download notes from Drive" width="300px" height="80px"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Contains direct access links for each sememester and subject.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Table of Contents&lt;/strong&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Refer &lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24./curriculum-syllabus-ece-reg-2018.pdf"&gt;Curriculum&lt;/a&gt; for detailed information.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-motivation"&gt;Motivation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-directory-downloads"&gt;Directory Downloads&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-semester-1"&gt;Semester 1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-semester-2"&gt;Semester 2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-semester-3"&gt;Semester 3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-semester-4"&gt;Semester 4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-semester-5"&gt;Semester 5&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-semester-6"&gt;Semester 6&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-semester-7"&gt;Semester 7&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-semester-8"&gt;Semester 8&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-contribute"&gt;Contribute&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-project-contributors"&gt;Project Contributors&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-feedback"&gt;Feedback&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-license"&gt;License&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-forking-this-repo"&gt;Forking this Repo?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-project-partners"&gt;Project Partners&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-mentions"&gt;Mentions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Warning&lt;/strong&gt;
Semester 1 - 3 notes are based on &lt;strong&gt;online classes&lt;/strong&gt;. Study material might be relevant but not the test notes. Take it with a grain of salt.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
💫 Motivation&lt;/h2&gt;
&lt;p&gt;Before I switched to on-campus courses, I took all of my classes online and hardly interacted with any upperclassmen. Without assistance, it was difficult for me to locate relevant readings and…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;There's also a website, for easy access to all the links for each subject:&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://notes.kunalkeshan.dev/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--ST2s0OgP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://notes.kunalkeshan.dev/thumbnail.jpeg" height="800" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://notes.kunalkeshan.dev/" rel="noopener noreferrer" class="c-link"&gt;
          ECE College Notes [SRMIST | 2020-24]
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Collection of all B.Tech ECE Notes for the academic year 2020-24. Contribute to the notes by visiting the GitHub Repo of this Project. Made with ♥ by Kunal Keshan.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--09gRXBkR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://notes.kunalkeshan.dev/favicon.ico" width="256" height="256"&gt;
        notes.kunalkeshan.dev
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Why do I call it the best?
&lt;/h2&gt;

&lt;p&gt;The best part of this project is that it's &lt;strong&gt;Open Source&lt;/strong&gt;, It's open, easily accessible and absolutely free for anyone in need of the resources present here.&lt;/p&gt;

&lt;p&gt;A few other reasons why I call it the best is...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Direct Download links for each semester and each subject.&lt;/li&gt;
&lt;li&gt;Guide on how to study for each subject and how difficulty it is. (Subjective)&lt;/li&gt;
&lt;li&gt;Has a website with the links for easy and direct access to the notes.&lt;/li&gt;
&lt;li&gt;Being open source, it is peer-reviewed and trustworthy!&lt;/li&gt;
&lt;li&gt;And much more...&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  My personal motivation towards this Project.
&lt;/h2&gt;

&lt;p&gt;When I joined college, I didn't have any access to notes until the professor was ready to share them or I had to ask a senior to share as well. In most cases, it took time and I received them only at last minute. &lt;br&gt;
This was not limited to notes alone but also for Question papers and other relevant study material.&lt;/p&gt;

&lt;p&gt;I started this project with one philosophy in mind,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Be the senior you need the most as a junior. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I wanted to help out others who could have access to the notes early and help achieve their academic goals quicker. So I took what I learnt from Web Development so far, and built out this project as way of expressing my philosophy. &lt;/p&gt;
&lt;h2&gt;
  
  
  Parts of this Project.
&lt;/h2&gt;

&lt;p&gt;The project is split into two parts, a major notes, the core of the project and the minor website, the support of this project.&lt;/p&gt;
&lt;h3&gt;
  
  
  Notes.
&lt;/h3&gt;

&lt;p&gt;As mentioned above, this is the core of the project that contains all notes and study material. You can access it through the GitHub Repository mentioned below.&lt;/p&gt;

&lt;p&gt;The notes are in the &lt;code&gt;main&lt;/code&gt; branch of the project.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A9-wwsHG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/kunalkeshan"&gt;
        kunalkeshan
      &lt;/a&gt; / &lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24"&gt;
        SRMIST-B.Tech-ECE-Notes-2022-24
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Collection of all B.Tech ECE Notes for the academic year 2020-24.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
B.Tech ECE Notes&lt;/h1&gt;
&lt;p&gt;
  &lt;a rel="noopener noreferrer" href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24/assets/thumbnail.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J-Ld4OXC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24/assets/thumbnail.png" alt="SRMIST B. Tech ECE Notes" width="60%" height="auto"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Collection of all B.Tech ECE Notes for the academic year 2022-24. Read below for further insight on subjects for Each Semester.&lt;/p&gt;

&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/b177f5222701a662fac839638764aeb73e2dd4c605cb3245b64ad3dc5adbd203/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6b756e616c6b657368616e2f53524d4953542d422e546563682d4543452d4e6f7465732d323032322d32343f7374796c653d736f6369616c"&gt;&lt;img src="https://camo.githubusercontent.com/b177f5222701a662fac839638764aeb73e2dd4c605cb3245b64ad3dc5adbd203/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6b756e616c6b657368616e2f53524d4953542d422e546563682d4543452d4e6f7465732d323032322d32343f7374796c653d736f6369616c" alt="GitHub forks"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/692d087cde40fbecf5b745379909cc8186b6aa07c3793957c8111fb6aa49d898/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6b756e616c6b657368616e2f53524d4953542d422e546563682d4543452d4e6f7465732d323032322d32343f7374796c653d736f6369616c"&gt;&lt;img src="https://camo.githubusercontent.com/692d087cde40fbecf5b745379909cc8186b6aa07c3793957c8111fb6aa49d898/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6b756e616c6b657368616e2f53524d4953542d422e546563682d4543452d4e6f7465732d323032322d32343f7374796c653d736f6369616c" alt="GitHub Repo stars"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/f4ec0159e9fef9de6b6ea1cfbef5e90821f69b0ddd9de2b283ca5e78ab25af6c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f77617463686572732f6b756e616c6b657368616e2f53524d4953542d422e546563682d4543452d4e6f7465732d323032322d32343f7374796c653d736f6369616c"&gt;&lt;img src="https://camo.githubusercontent.com/f4ec0159e9fef9de6b6ea1cfbef5e90821f69b0ddd9de2b283ca5e78ab25af6c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f77617463686572732f6b756e616c6b657368616e2f53524d4953542d422e546563682d4543452d4e6f7465732d323032322d32343f7374796c653d736f6369616c" alt="GitHub watchers"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://drive.google.com/drive/folders/191lQV0by-ZBqPv0gQHhT8F9vKCgQuq2X?usp=sharing" rel="nofollow"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9XPK7Vka--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24/assets/drive-card.jpg" alt="Download notes from Drive" width="300px" height="80px"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Large Documents are present in the above drive as GitHub only offers 25mb max per document.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://notes.kunalkeshan.dev?utm_source=github.com&amp;amp;utm_medium=social" rel="nofollow"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--psbjVS9c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24/assets/website-card.jpg" alt="Download notes from Drive" width="300px" height="80px"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Contains direct access links for each sememester and subject.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Table of Contents&lt;/strong&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Refer &lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24./curriculum-syllabus-ece-reg-2018.pdf"&gt;Curriculum&lt;/a&gt; for detailed information.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-motivation"&gt;Motivation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-directory-downloads"&gt;Directory Downloads&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-semester-1"&gt;Semester 1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-semester-2"&gt;Semester 2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-semester-3"&gt;Semester 3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-semester-4"&gt;Semester 4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-semester-5"&gt;Semester 5&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-semester-6"&gt;Semester 6&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-semester-7"&gt;Semester 7&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-semester-8"&gt;Semester 8&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-contribute"&gt;Contribute&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-project-contributors"&gt;Project Contributors&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-feedback"&gt;Feedback&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-license"&gt;License&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-forking-this-repo"&gt;Forking this Repo?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-project-partners"&gt;Project Partners&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24#-mentions"&gt;Mentions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Warning&lt;/strong&gt;
Semester 1 - 3 notes are based on &lt;strong&gt;online classes&lt;/strong&gt;. Study material might be relevant but not the test notes. Take it with a grain of salt.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
💫 Motivation&lt;/h2&gt;
&lt;p&gt;Before I switched to on-campus courses, I took all of my classes online and hardly interacted with any upperclassmen. Without assistance, it was difficult for me to locate relevant readings and…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  Website.
&lt;/h3&gt;

&lt;p&gt;The website is a support to the whole project, it contains links for each semester, courses in each semester, they include the repo, download and drive links.&lt;/p&gt;

&lt;p&gt;The website is present in the &lt;code&gt;client&lt;/code&gt; branch of the project and is deployed via &lt;code&gt;gh-pages&lt;/code&gt;.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://notes.kunalkeshan.dev/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--ST2s0OgP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://notes.kunalkeshan.dev/thumbnail.jpeg" height="800" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://notes.kunalkeshan.dev/" rel="noopener noreferrer" class="c-link"&gt;
          ECE College Notes [SRMIST | 2020-24]
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Collection of all B.Tech ECE Notes for the academic year 2020-24. Contribute to the notes by visiting the GitHub Repo of this Project. Made with ♥ by Kunal Keshan.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--09gRXBkR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://notes.kunalkeshan.dev/favicon.ico" width="256" height="256"&gt;
        notes.kunalkeshan.dev
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  How can you Contribute?
&lt;/h2&gt;

&lt;p&gt;If you have some material that will add value to the project or have some suggestions that can improve the quality of the website. You're welcomed to do that!&lt;/p&gt;

&lt;p&gt;Check out the contributing guidelines on how to contribute for the following parts of the project mentioned. &lt;/p&gt;

&lt;p&gt;Contribute to the &lt;strong&gt;Notes&lt;/strong&gt;: &lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24/blob/main/CONTRIBUTING.md"&gt;https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24/blob/main/CONTRIBUTING.md&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Contribute to the &lt;strong&gt;Website&lt;/strong&gt;: &lt;a href="https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24/blob/client/CONTRIBUTING.md"&gt;https://github.com/kunalkeshan/SRMIST-B.Tech-ECE-Notes-2022-24/blob/client/CONTRIBUTING.md&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Share this with your friends who are pursuing ECE if you find this helpful!&lt;/p&gt;

</description>
      <category>ece</category>
      <category>btech</category>
      <category>srmist</category>
      <category>notes</category>
    </item>
    <item>
      <title>Should I learn WordPress or Full-Stack Development?</title>
      <dc:creator>Kunal Keshan</dc:creator>
      <pubDate>Mon, 13 Jun 2022 16:07:18 +0000</pubDate>
      <link>https://dev.to/kunalkeshan/should-i-learn-wordpress-or-full-stack-development-23fp</link>
      <guid>https://dev.to/kunalkeshan/should-i-learn-wordpress-or-full-stack-development-23fp</guid>
      <description>&lt;h1&gt;
  
  
  Overview
&lt;/h1&gt;

&lt;p&gt;If you're a beginner in web development, you might've gotten a lot of suggestions from the net about choosing WordPress over full-stack development and vice-versa. &lt;/p&gt;

&lt;p&gt;Comparing the amount of time taken to learn. How much important is it in the industry? How relevant it is to you and what you're trying to achieve? And how much will it help pay your bills? &lt;/p&gt;

&lt;p&gt;Taking the above questions and much more into account, you might still be confused about which one to choose over the other. &lt;/p&gt;

&lt;p&gt;Let's also take into account any No Code platforms in this discussion.&lt;/p&gt;




&lt;h1&gt;
  
  
  Quick Intro to WordPress
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;WordPress is a free and open-source content management system written in PHP and paired with a MySQL or MariaDB database. Features include a plugin architecture and a template system, referred to within WordPress as Themes - &lt;a href="https://g.co/kgs/FcaVjF"&gt;Google&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can literally create websites within a matter of minutes and get them up and running immediately. &lt;br&gt;
A multitude of websites ranging from simple portfolios, product display, and research websites to complex eCommerce websites, blogs, registration apps and much more! WordPress has it all, the great part is that you don't need to know how to code to create WordPress Websites. &lt;/p&gt;

&lt;p&gt;Other Platforms like &lt;a href="https://www.wix.com/"&gt;Wix&lt;/a&gt;, &lt;a href="https://ghost.org/"&gt;Ghost&lt;/a&gt;, and &lt;a href="https://www.squarespace.com/"&gt;Squarespace&lt;/a&gt; also allow you to do the same.&lt;/p&gt;




&lt;h1&gt;
  
  
  Full-Stack Development
&lt;/h1&gt;

&lt;p&gt;Full-Stack Development is a journey of creating websites from scratch. Building the frontend and the backend of the application using various Tech Stacks.&lt;/p&gt;

&lt;p&gt;This involves putting in the hard work of learning programming languages, building out projects, facing lots of errors and making lots of mistakes. &lt;/p&gt;

&lt;p&gt;Learning Full-Stack development takes time and hard work. And the work that you put in will definitely pay off in the long term. &lt;/p&gt;

&lt;p&gt;Developing websites by yourself will give you a lot of space to customize things to your own requirements and not give in to the constraints of No Code platforms. &lt;/p&gt;




&lt;h1&gt;
  
  
  Discussing WordPress vs Full-Stack Development
&lt;/h1&gt;

&lt;p&gt;Both are awesome and are extremely relevant. It's the use case that should be taken into account when you're trying to choose what to move forward with. &lt;/p&gt;

&lt;p&gt;If you're simply looking to put some content out on the web, without the hassle or learning how to code. Or if you want to learn a way to do it for others (freelancing) by creating static websites, then No Code platforms should be your go to! &lt;/p&gt;

&lt;p&gt;They're easy to pick up, build, maintain and deploy. &lt;/p&gt;

&lt;p&gt;However you'll be limited with the plugins and themes that are provided by these platforms, it'll be tough building on top of them if you have no knowledge of development. &lt;/p&gt;

&lt;p&gt;Developing products, services, and apps and customizing to the very minute details require you to learn development. And that's the great part about it, you learn and implement stuff that No Code platforms do not have the option for. &lt;/p&gt;

&lt;p&gt;Learning Development also opens doors to opportunities that you might've not had with working with WordPress alone. You even get to create plugins for WordPress. &lt;/p&gt;




&lt;h1&gt;
  
  
  Different Perspectives
&lt;/h1&gt;

&lt;p&gt;If it's something that is short term, or something that you're looking to get done quickly. WordPress is what you should choose. &lt;/p&gt;

&lt;p&gt;When it comes to creating Web Apps specifically, you'll need to learn Development. In the long run of learning, it will pay much better than limiting yourself to WordPress alone.&lt;/p&gt;




&lt;h1&gt;
  
  
  The Best of Both Worlds
&lt;/h1&gt;

&lt;p&gt;Something I've been noticing recently is that many SaaS founders use the combination of both No Code platforms and the knowledge of Full-Stack Development to their advantage. &lt;/p&gt;

&lt;p&gt;They create their product page with No Code Platforms for the purpose of marketing and advertising their product/service. And when it comes to their actual service, it's fully built from scratch and customized to the service they're providing. &lt;/p&gt;

&lt;p&gt;Move forward with the one that suits your needs, and also learn how to leverage the best of both worlds. &lt;/p&gt;




&lt;p&gt;Thanks, &lt;a href="https://www.linkedin.com/in/chandana-vasa-210503178"&gt;Chandana&lt;/a&gt; for coming up with this amazing question! And &lt;a href="https://www.gsthina.me/"&gt;Thina&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/himanshu-thakurrr/"&gt;Himanshu&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/avichal-gupta/"&gt;Avichal&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/arindam-lahiri/"&gt;Arindam&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/snehilcodes/"&gt;Snehil&lt;/a&gt; for giving their insights as well. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>wordpress</category>
      <category>discuss</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The Developer Urge to Start New Projects (and how to stick to your current ones).</title>
      <dc:creator>Kunal Keshan</dc:creator>
      <pubDate>Tue, 31 May 2022 08:16:26 +0000</pubDate>
      <link>https://dev.to/kunalkeshan/the-developer-urge-to-start-new-projects-and-how-to-stick-to-your-current-ones-5bo9</link>
      <guid>https://dev.to/kunalkeshan/the-developer-urge-to-start-new-projects-and-how-to-stick-to-your-current-ones-5bo9</guid>
      <description>&lt;p&gt;It's a casual day of coding on a project that I've been working on for about a month. While learning how to implement a new feature, I got an &lt;strong&gt;idea&lt;/strong&gt; of how to use what I exactly learnt into a new project. &lt;br&gt;
I go over to my GitHub account, create a new repository, while the dozens of incomplete projects watch me do it. (Find it relatable?! 😅😂)&lt;/p&gt;

&lt;p&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%2Femu3zlshpofbe9t36g2h.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%2Femu3zlshpofbe9t36g2h.png" alt="Creating new projects, with dozens of incomplete projects still left"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What is it about new projects that we drop the current ones we're working on? Why are they (generally speaking) more fun? and how do we stick to the current work before moving on to new projects? &lt;/p&gt;

&lt;p&gt;I've been thinking about this and to solve them, I reached out to my mentors, seniors and peers in my college. &lt;br&gt;
What I learnt was much more than what I thought the answer to this could be!&lt;/p&gt;

&lt;p&gt;Personally, I feel that whenever I learn something new I must try and implement it somewhere to explore all sides of it. This goes on like a domino effect, one new learning, triggers another project and there's always something new to learn in every project. &lt;/p&gt;

&lt;p&gt;Obviously, my opinion didn't leave me satisfied and to know more about this and how to stick to the current projects I was working on, I got words from my seniors on this. &lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;As Developers we need to understand that not all side projects need to be completed. Every projects is an opportunity and a valuable experience to learn something new regardless of it's success or failure. Only when you're strongly committed to a project will you be able to complete, or until you're getting paid for it XD. - &lt;a href="https://www.linkedin.com/in/snehilcodes/" rel="noopener noreferrer"&gt;Snehil&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;🤯 Yep, that's how I felt too. It's okay to have numerous uncompleted projects, they're all part of you're developer journey and helped you get where you are today. &lt;br&gt;
Some points to mention to stick to your current projects, &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Write down your new ideas somewhere, someplace that you know you will refer to frequently. &lt;/li&gt;
&lt;li&gt;This way your head is clear on only what you're working on.&lt;/li&gt;
&lt;li&gt;When you're somewhat free, you can pick up stuff from the list and start to work on it.&lt;/li&gt;
&lt;/ol&gt;




&lt;blockquote&gt;
&lt;p&gt;It's easier to start new projects because they're simple to initiate and not as simple as completing already on going projects. - &lt;a href="https://www.linkedin.com/in/avichal-gupta/" rel="noopener noreferrer"&gt;Avichal&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/arindam-lahiri/" rel="noopener noreferrer"&gt;Arindam&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Human nature being that we choose the path of least resistance we can take up, and yes, new projects are much easier to set up, there's no bound to complete them, and it's much simpler than finishing ongoing projects.&lt;br&gt;
Some ways to stick to your current projects,&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The way to stick to your project is to work on ones that solve a personal problem, something that you're passionate to find a solution for, not something that will make your resume shine. This way, you'll be more dedicated to do whatever necessary to the end. &lt;/li&gt;
&lt;li&gt;Work on projects that place you in the right challenging zone, you implement what you already know, and you also put in effort to add something extra, something you didn't know before and nothing too complicated. &lt;/li&gt;
&lt;li&gt;Break your projects into small pieces and make a plan to complete them on a daily basis. &lt;/li&gt;
&lt;li&gt;Work on projects that you're passionate about, or even if it's a simple clone project, add additional feature that you think will improve the app as a whole.
&lt;/li&gt;
&lt;/ol&gt;




&lt;blockquote&gt;
&lt;p&gt;A new project gives us a clean canvas to work, a start of the project is the time when you can go creative, a new design, new APIs and a completely new outlook. &lt;br&gt;
Current projects can get really boring, I think constant progress is the only thing which can keep you going once you stumble. - &lt;a href="https://www.linkedin.com/in/hardik-garg/" rel="noopener noreferrer"&gt;Hardik Garg&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Constant progress is the process of doing something consistently. Without consistency a flow is broken and it's difficult to regain the momentum there once was. &lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;It's a very common experience to go through. From my personal experience, I can say that we tend to loose interest in a project if we work on it for too long. - &lt;a href="https://www.linkedin.com/in/gauravprasadgp/" rel="noopener noreferrer"&gt;Gaurav Prasad&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In order to deal with this,&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create milestones for your projects. &lt;/li&gt;
&lt;li&gt;Track them and work on it consistently.&lt;/li&gt;
&lt;li&gt;After achieving it, start doing the same with the second project as well. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Make sure that the time allocated is not to long to make it boring. Always try to understand the project as a whole before coding into it. &lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;If you're working on a project with a vision and a goal, you'll avoid skipping on it. However, if you're working on a project just for the sake of doing it, you'll jump from one to another. - &lt;a href="https://gsthina.me/" rel="noopener noreferrer"&gt;GS Thina&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Yep, agree with this one. Until you know that it provides a long run benefit to you or to others, there will be no reason to stick to it in the short term.&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;It's better to not commit to new projects until you're done with the older ones. - &lt;a href="https://www.linkedin.com/in/gopalakrishnan-v-s-a23510206/" rel="noopener noreferrer"&gt;Vivek&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;What are your own personal theories on this topic?&lt;/p&gt;

&lt;h2&gt;
  
  
  In Conclusion
&lt;/h2&gt;

&lt;p&gt;New Projects are fun, they help stimulate our creative minds and as developers it's a part of the process to have many unfinished projects and it's nothing to feel guilty about.&lt;br&gt;
It's human nature to get bored or to go to what seems more interesting than to stick to what you're currently doing right now. &lt;br&gt;
I've gotten a lot of great insights from this and will be back to answer such questions with great insights! Stay tuned. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>productivity</category>
      <category>management</category>
    </item>
    <item>
      <title>From a Biology Enthusiast to a Coding Freak. My Journey So Far. [ August 2021 Perspective]</title>
      <dc:creator>Kunal Keshan</dc:creator>
      <pubDate>Mon, 28 Mar 2022 11:43:58 +0000</pubDate>
      <link>https://dev.to/kunalkeshan/from-a-biology-enthusiast-to-a-coding-freak-my-journey-so-far-august-2021-perspective-49ca</link>
      <guid>https://dev.to/kunalkeshan/from-a-biology-enthusiast-to-a-coding-freak-my-journey-so-far-august-2021-perspective-49ca</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Specific Knowledge is found by pursuing your genuine curiosity and passion rather than whatever is hot right now. &lt;br&gt;
Naval Ravikant.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I'd like to give you a little bit of background check on myself. My parents, their siblings and their parents all come from a medical background. Even my sister is pursuing medicine. When I entered 11th class just like everyone else, I was given the option to choose between, Biology, Computer and Commerce. &lt;/p&gt;

&lt;p&gt;Having come from such a background, I had unknowingly developed a notion that I had to continue in the same business down the line, that I too had to pursue medicine and so I ended up choosing the Biology stream.&lt;/p&gt;

&lt;p&gt;I wasn't exactly into pure science, at the moment when I was choosing my subjects, I felt something was off, so I gave it careful thought. We had an option to choose 6 subjects in total, Biology, Physics, Chemistry, English were the compulsory ones, now I had the option to choose subjects like PT, or even home science, but I ended up going with Math and Engineering Graphics as my last two subjects for 11th.&lt;/p&gt;

&lt;p&gt;I was the only one in my class with that combination. This combination had its pros and cons, but the freedom it gave me to switch my future career choices was what allowed me to dedicate my time to each of those subjects.&lt;/p&gt;

&lt;p&gt;Somewhere deep in me, I knew that biology wasn't my cup of coffee, as interesting as it may be, it took me 2 ½ years to realize that I like physics, maths and almost 3 years to understand that I like coding even more. &lt;/p&gt;

&lt;p&gt;Towards the end of my board exams for the 12th class, I was going and registering for all the entrance exams that I could find, NEET, JEE, were the main focus but on the side, I had registered for the college conducted entrance exams as well, SRM, BITS, HITS, whatever I could find, I applied.&lt;/p&gt;

&lt;p&gt;Then the pandemic came along, all the exams were postponed and colleges closed. I was given an ample amount of time to prepare for those exams, out of all the 8 or 9 applied, I only attended 3. And NEET was not one of them. As it turned out, I failed in all of them.&lt;/p&gt;

&lt;p&gt;It was depressing at first, I ended up thinking about all the things I had done wrong and while thinking about my past, I remembered back in 9th class we had a computer science subject where we had to code websites using HTML alone.&lt;/p&gt;

&lt;p&gt;I remembered how fun it used to be back then and that piqued an interest in me again. Since I already had the privilege of owning a laptop, I started surfing the internet about HTML, how to code in it and mainly what could be the job opportunities surrounding it. That's when I came to know terms like web developer, full-stack, databases and such.&lt;/p&gt;

&lt;p&gt;This was all happening around August 2020, SRM and VIT had announced that they'll be doing admissions based on the 12th marks that we had obtained. This was the only opportunity that I had of getting into a college, so I applied for both.&lt;/p&gt;

&lt;p&gt;I was hoping a lot for VIT, but couldn't get shortlisted there. However, I was able to get selected for SRM, and that's when the time came to choose which course to pursue. I had to think this through, What am I good at? What made me happy? Which course would have a good scope in the future? Which one has the best career opportunities in the future?&lt;/p&gt;

&lt;p&gt;Back in school, I used to tinker around with a lot of electronic projects and I enjoyed doing them. This was one of the supporting reasons why I ended up choosing Electronic and Communications Engineering (ECE).&lt;/p&gt;

&lt;p&gt;In September 2020, I had learnt about HTML, and a bit of CSS, but was feeling very nervous about JavaScript (JS), I never really had any knowledge of coding, whenever I used to look at JS code, it seemed so overwhelming and something very advanced. &lt;/p&gt;

&lt;p&gt;I decided to take a break and focus on college for now. The first semester classes had begun around the end of September and as it turned out one of the subjects of the 1st sem was Programming for Problem-solving, it involved learning C Programming from the very basics. I'm really glad I had this one subject, after going through it, I was a bit more confident about coding and when I looked up JS code, some of it started making some sense.&lt;br&gt;
Fast forward to January 2021, I came across a post of one of the clubs in SRM known as Think-Digital conducting a workshop on web development, I thought this was the perfect opportunity to pick it up again and the best part, it was for free. &lt;/p&gt;

&lt;p&gt;On 23rd January, I attended their workshop and met some of my seniors within the college. All online of course. They had taught us how to make a login page with some added functionality, it was only toward the end of the session I came to know that the club was conducting this workshop to recruit members, to get in the club, the main requirement was to just be curious about the domain that you were interested in.&lt;/p&gt;

&lt;p&gt;They gave us the task of recreating the same project with some added JS functionality, I did only a part of it. Later they conducted an interview, I have no idea how I got through it, if I recall correctly I was asked, "How much time are you willing to dedicate to the work given to you?", I replied, "Depends on how interesting the task is," and at that moment I felt I messed it all up, one of them said, "Okay, very honest answer, wasn't expecting that." &lt;/p&gt;

&lt;p&gt;There was one question where I really struggled, "What three words would you use to describe yourself?", I was stuck there, I realized that I didn't know myself well enough yet to answer that. All of this was happening within almost two weeks and it was so damn exciting.&lt;/p&gt;

&lt;p&gt;Somehow, I got into the club on the 2nd of February. They conducted a welcome meeting for the freshers getting into the club, we introduced ourselves and were given a background of the Club and what it does, how things are conducted and what role we play in the club. &lt;/p&gt;

&lt;p&gt;The unique thing about this club was that there was a system of mentors and mentees which everyone had to go through, we started once every week, where the seniors would teach us a specific thing about the domain we were in and gave us tasks to work on.&lt;br&gt;
It started with coding, sign up and login forms, to making clones, then to-do lists where we started going into detail about JS, APIs, and at the moment we are learning about, DBMS (Database Management Systems) specifically MySQL along with Node.js and express.&lt;/p&gt;

&lt;p&gt;Many were challenging, but the fact that the seniors readily helped us whenever we were stuck was great. I couldn't be more privileged. Getting into the club was one of the best things that have ever happened to me. &lt;/p&gt;

&lt;p&gt;Truth be told, somewhere towards the end of March, while we were still at the beginning of the training with the club, I felt things were going a bit too slow. At the same time, one of my friends, Surendar PD, from SRM Ramapuram was also picking up web development and was working on React Projects. (React is a front-end library, that uses the concepts of components for the simplification of creating complex user systems.) &lt;/p&gt;

&lt;p&gt;That piqued my interest again, and I had something new to learn. He taught me about creating react apps and showed me some resources to learn from. A few months later, I made a simple YouTube clone using react. Haven't worked much on it since, but I do know that I will be using it in the near future to build full-stack apps using the MERN stack. Something that I'm personally looking forward to.&lt;/p&gt;

&lt;p&gt;Retrospecting the last 8 months, it's been an amazing time spent learning a lot of things, and slowly transitioning from being afraid of coding to being unable to stop coding at all. For me, most of it didn't seem like work one bit, all I knew was that I was having fun and still am. I guess that is what makes the difference between what you have to do and what you want to do for yourself. Do you agree? What are your thoughts?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>journey</category>
      <category>growth</category>
      <category>development</category>
    </item>
    <item>
      <title>Create a Contact Form with Node, Express, Nodemailer, and TailwindCSS.</title>
      <dc:creator>Kunal Keshan</dc:creator>
      <pubDate>Mon, 28 Mar 2022 09:32:17 +0000</pubDate>
      <link>https://dev.to/kunalkeshan/create-a-contact-form-with-node-express-nodemailer-and-tailwindcss-4j5c</link>
      <guid>https://dev.to/kunalkeshan/create-a-contact-form-with-node-express-nodemailer-and-tailwindcss-4j5c</guid>
      <description>&lt;p&gt;Be it for your Portfolio, a company website, or any other website that you might be working on, a functional contact form leaves a good impression and also automates the process of sending the emails to your account. &lt;/p&gt;




&lt;p&gt;In this tutorial, I'll show you how to make a contact form using Node, Express, Nodemailer and TailwindCSS. We'll set up a custom route to accept form responses, serve the HTML file to the browser, add functionality to the form and style it using TailwindCSS. &lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;NodeJs is installed in your system. If not, install it from &lt;a href="https://nodejs.org/en/"&gt;here&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Basic understanding of HTML and CSS.&lt;/li&gt;
&lt;li&gt;Basic understanding of Express. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here's the GitHub Repo Link to this Project if you want to skip to the code directly.&lt;br&gt;
&lt;a href="https://github.com/kunalkeshan/node-express-nodemailer-tailwindcss-contact-form"&gt;https://github.com/kunalkeshan/node-express-nodemailer-tailwindcss-contact-form&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's dive into it! &lt;/p&gt;


&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Create a new project (If you've not made one already). I'll call it &lt;code&gt;node-express-nodemailer-tailwindcss-contact-form&lt;/code&gt; 😅 and open your terminal or VS Code within this project.&lt;/li&gt;
&lt;li&gt;Run npm init -y to start a node project.&lt;/li&gt;
&lt;li&gt;Install the following dependencies in the project.

 &lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i express nodemailer dotenv
npm i &lt;span class="nt"&gt;-D&lt;/span&gt; tailwindcss postcss autoprefixer nodemon concurrently
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Express and Nodemailer are the core packages that will allow us to add the contact form functionalities and dotenv is to protect our email password.&lt;br&gt;
 &lt;br&gt;
TailwindCSS, PostCSS, and Autoprefixer are development dependencies that allow us to use tailwind classes in our project, generate a clean output CSS(postcss) file with cross-browser compatibility (autoprefixer).&lt;br&gt;
 &lt;br&gt;
Nodemon and Concurrently are development dependencies that allow the server to restart when there are new changes(nodemon) and run multiple scripts together(concurrently).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add the following scripts to the package.json.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm run build &amp;amp;&amp;amp; node index.js"&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"dev"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"concurrently &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;nodemon index.js&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;npm run tailwind:watch&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm run tailwind"&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"tailwind"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx tailwindcss -i tailwind.css -o public/style.css"&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"tailwind:watch"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx tailwindcss -i tailwind.css -o public/style.css --watch"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;You'll need three parts for this project, a request handler, a function to send the email and the frontend with the functionality. &lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Contact Form Request Handler
&lt;/h2&gt;

&lt;p&gt;Create a &lt;code&gt;index.js&lt;/code&gt; in the root of your project and let's take a look at it part by part.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Import all the dependencies required. Note: See how dotenv is imported before all the custom functions as we'll need it to access the environment variables in the &lt;code&gt;.env&lt;/code&gt; file.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/** index.js
* Contact Form Application
*/&lt;/span&gt;

&lt;span class="c1"&gt;// Dependencies&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;express&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;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;path&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dotenv&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;config&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="c1"&gt;// const { sendContactEmail } = require('./mailer');&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Set up Middlewares. 
Express JSON middleware is used to parse incoming requests as JSON. Express URLencoded middleware is used to parse URL encoded requests and attach them to the request body and finally Express static is used to serve the public files to the browser.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt; &lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Initializing Express App&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;express&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// Setting up middleware&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;express&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;express&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;urlencoded&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;extended&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;}));&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;express&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;static&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;__dirname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;public&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Contact form Route.
Nothing too complicated. A route that accepts POST requests at &lt;code&gt;/api/contact&lt;/code&gt;. A basic contact form will collect the name, email and message of the person who wants to contact you, so at the start, we're destructuring those details from the request body. 
Next, we're passing on the details to a mailer function (which we'll get to in a few) and if all goes well we respond with success and a status 200 and if anything goes wrong, the catch block responds with an error and a status 400.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Application routes&lt;/span&gt;
&lt;span class="cm"&gt;/**
* @description Accept contact form data and send it to the server
* @api POST /api/contact
* @data {string} name, {string} email, {string} message
* @access Public
*/&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/contact&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&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;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&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;// Collecting required information from the Request Body&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;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;email&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="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;req&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="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="c1"&gt;// Sending the email&lt;/span&gt;
&lt;span class="c1"&gt;// await sendContactEmail({ to: email, name, message });&lt;/span&gt;
&lt;span class="nx"&gt;res&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Email sent successfully&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;email&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="na"&gt;success&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&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="nf"&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="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Unable to process request&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
&lt;span class="na"&gt;success&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Start the Server.
We're extracting the PORT from the environment and if one is not available, we assign it a value of 3000. Next, we start the server using the app listen method.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Initialzing Server&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;PORT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PORT&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;PORT&lt;/span&gt;&lt;span class="p"&gt;,&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Server running at http://localhost:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;PORT&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&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;h2&gt;
  
  
  Mailer Function
&lt;/h2&gt;

&lt;p&gt;Create a &lt;code&gt;mail.js&lt;/code&gt; file in the root and let's explore its content part by part. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Importing all Dependencies. Along with Nodemailer, we're getting our email and password from the &lt;code&gt;.env&lt;/code&gt; file as well (We'll see more about it in a few).

 &lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/** mail.js
* Node Mailer Setup
*/&lt;/span&gt;

&lt;span class="c1"&gt;// Dependencies&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;nodemailer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;nodemailer&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;email&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;MAIL_EMAIL&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;password&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;MAIL_PASSWORD&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Creating a Mail Transport. We're using Gmail as the nodemailer service, you can use any SMTP that you wish, Gmail is easy and quick to set up.

 &lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Mail Transporter&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;transport&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;nodemailer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createTransport&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="na"&gt;service&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gmail&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="na"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="na"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="na"&gt;pass&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Kunal Keshan &amp;lt;example@gmail.com&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Function to send the contact form submission to your email. Using the &lt;code&gt;transport&lt;/code&gt; &lt;code&gt;sendMail&lt;/code&gt; method, and setting up the options, the function send's email to your account. 
You can send HTML or replace it with text as well if you want something simple. And finally, we're invoking the &lt;code&gt;sendMail&lt;/code&gt; with the options and returning it.

 &lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
* @description Send email to the user
* @param {object} options
* @param {string} options.to
* @param {string} options.subject
* @param {string} options.message
*/&lt;/span&gt;
&lt;span class="nx"&gt;exports&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sendContactEmail&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;name&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="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="nx"&gt;mailOptionsToOwner&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Contact Form Submission from &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &amp;lt;&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;to&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;html&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`
            &amp;lt;h1&amp;gt;Contact Form Submission&amp;lt;/h1&amp;gt;
            &amp;lt;p&amp;gt;Name: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &amp;lt;&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;to&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;gt;&amp;lt;/p&amp;gt;
            &amp;lt;p&amp;gt;&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="s2"&gt;&amp;lt;/p&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="nx"&gt;mailOptionsToUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;to&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Thanks for contacting me!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;I will get back to you soon!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;transport&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sendMail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;mailOptionsToOwner&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nx"&gt;transport&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sendMail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;mailOptionsToUser&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;ul&gt;
&lt;li&gt;Create a &lt;code&gt;.env&lt;/code&gt; file and add your email and password to it. To add a Gmail account as a nodemailer service, you'll need to have 2FA enabled and you'll have to create an app password. Check this out on how to do it.

 &lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# .env
# NODEMAILER CONFIG
MAIL_EMAIL=&amp;lt;example@gmail.com&amp;gt;
MAIL_PASSWORD=&amp;lt;app password here&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;In the index.js uncomment the import and invoke of the &lt;code&gt;sendContactMail()&lt;/code&gt; function. &lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  The Frontend
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Setting it up.
Create a &lt;code&gt;public&lt;/code&gt; directory in your project and three files in it - &lt;code&gt;index.html&lt;/code&gt;, &lt;code&gt;style.css&lt;/code&gt;, and &lt;code&gt;script.js&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At the Root of the project, create a &lt;code&gt;tailwind.css&lt;/code&gt; file and add the following lines to it.&lt;br&gt;
&lt;br&gt;
 &lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@tailwind&lt;/span&gt; &lt;span class="n"&gt;base&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@tailwind&lt;/span&gt; &lt;span class="n"&gt;components&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@tailwind&lt;/span&gt; &lt;span class="n"&gt;utilities&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In your command line run - &lt;code&gt;npx tailwindcss init -p&lt;/code&gt;. This will create two files &lt;code&gt;tailwindcss.config.js&lt;/code&gt; and &lt;code&gt;postcss.config.js&lt;/code&gt; in your project. &lt;br&gt;
Open &lt;code&gt;tailwindcss.config.js&lt;/code&gt; and you'll notice that you'll have the following object configuration present already.&lt;br&gt;
&lt;/p&gt;

&lt;p&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;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
&lt;span class="na"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="na"&gt;extend&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="na"&gt;plugins&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Modify the &lt;code&gt;content: []&lt;/code&gt; and add this to it &lt;code&gt;content: ["./public/**/*.html"]&lt;/code&gt;. This is telling tailwindcss to watch the classes in the HTML files.&lt;br&gt;
Do you remember the scripts that we added, in the beginning, to the &lt;code&gt;package.json&lt;/code&gt;? Here's it another time.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm run build &amp;amp;&amp;amp; node index.js"&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"dev"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"concurrently &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;nodemon index.js&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;npm run tailwind:watch&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm run tailwind"&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"tailwind"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx tailwindcss -i tailwind.css -o public/style.css"&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"tailwind:watch"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx tailwindcss -i tailwind.css -o public/style.css --watch"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We use the tailwind cli to watch any changes that we do to our project (specifically the HTML files as we mentioned in the content for the tailwind config) and output the classes we used with the styles into a styles.css in the same public directory. Notice that the --watch flag is being used to keep track of changes, something similar to nodemon. &lt;/p&gt;

&lt;p&gt;We also have a build script that runs the tailwindcss cli and outputs the style in a separate file. &lt;br&gt;
It's a keep only what you use approach.&lt;/p&gt;
&lt;h3&gt;
  
  
  HTML - index.html
&lt;/h3&gt;

&lt;p&gt;Add the following code to the &lt;code&gt;index.html&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Contact Form&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"preconnect"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://fonts.googleapis.com"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"preconnect"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://fonts.gstatic.com"&lt;/span&gt; &lt;span class="na"&gt;crossorigin&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&amp;amp;display=swap"&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/style.css"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"w-full h-screen flex flex-col gap-2 items-center justify-center bg-gradient-to-br from-green-400 to-blue-500 text-center"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"text-2xl font-semibold"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Contact&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"contact"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"w-full p-2 flex flex-col md:w-2/3 gap-2 lg:w-1/2"&lt;/span&gt; &lt;span class="na"&gt;autocomplete=&lt;/span&gt;&lt;span class="s"&gt;"off"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"eg: John Smith"&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"py-1 px-2 border border-black rounded"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"example@gmail.com"&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"py-1 px-2 border border-black rounded"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;textarea&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"message"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"message"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Hey! Let's get in touch, I want to..."&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"py-1 px-2 border border-black rounded resize-y"&lt;/span&gt; &lt;span class="nt"&gt;&amp;gt;&amp;lt;/textarea&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-blue-500 py-2 px-1 rounded text-md w-fit mx-auto font-semibold text-white hover:bg-opacity-100 bg-opacity-80"&lt;/span&gt; &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Get in Touch! &lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"success"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"hidden text-md font-semibold"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; You've successfully contacted me, I'll get back to you soon!&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"error"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"hidden text-md font-semibold flex-col items-center justify-center"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Oops! There's some error while sending me the contact details.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-blue-500 py-2 px-1 rounded w-fit mx-auto text-white bg-opacity-80 hover:bg-opacity-100"&lt;/span&gt; &lt;span class="na"&gt;onclick=&lt;/span&gt;&lt;span class="s"&gt;"javascript:window.location.reload();"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Try again&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"loading"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"hidden text-md font-semibold"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Your Submission is being sent...&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"/script.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now if you start the server, using npm run dev you should be able to see in your browser the following website.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y_r4zd3b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tqxie8bj38sbvwcx6pj8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y_r4zd3b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tqxie8bj38sbvwcx6pj8.jpg" alt="Contact Form website output" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  Functionality - script.js
&lt;/h3&gt;

&lt;p&gt;Add the following code to the script.js file. And let's examine what's actually happening.&lt;br&gt;
&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="cm"&gt;/**
* Contact Form Functionality
*/&lt;/span&gt;

&lt;span class="c1"&gt;// Containers&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;contactForm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;contact&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;loading&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;loading&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;success&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;success&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;errorEl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;error&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Hide Container Function&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hideAllContainers&lt;/span&gt; &lt;span class="o"&gt;=&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="nx"&gt;contactForm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;none&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;none&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;success&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;none&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;errorEl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;none&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Contact Form Submit Handler&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;handleContactFormSubmit&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="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preventDefault&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="nx"&gt;contactForm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;animate-pulse&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;block&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="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;email&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="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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="na"&gt;message&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="nx"&gt;value&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="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/contact&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&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="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;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nf"&gt;hideAllContainers&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;contactForm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;animate-pulse&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;success&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;block&lt;/span&gt;&lt;span class="dl"&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;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="nf"&gt;hideAllContainers&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;errorEl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;flex&lt;/span&gt;&lt;span class="dl"&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="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;DOMContentLoaded&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&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="nf"&gt;hideAllContainers&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;contactForm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;flex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;contactForm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;submit&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;handleContactFormSubmit&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;ol&gt;
&lt;li&gt;All the DOM Elements are being called using the DOM API and are being stored in variables. &lt;/li&gt;
&lt;li&gt;A function &lt;code&gt;hideAllContainers()&lt;/code&gt; is used to hide all the containers by accessing their style property. &lt;/li&gt;
&lt;li&gt;A function &lt;code&gt;handleContactFormSubmit()&lt;/code&gt; is used to process the form submission. If all goes well, the success div is shown and if anything goes wrong the error div is displayed prompting to try to fill the form again.&lt;/li&gt;
&lt;li&gt;On the document object, an event listener is added called 'DOMContentLoaded' that only fires the callback function once the HTML file is loaded.&lt;/li&gt;
&lt;li&gt;Once the HTML file is loaded hide all containers, then display the form alone and finally add the submit event to the form and assign the &lt;code&gt;handleContactFormSubmit&lt;/code&gt; as the callback function.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As simple as that, you've just made a functional contact form. Test it out and you'll receive the email from the person who's trying to contact you. &lt;/p&gt;

&lt;p&gt;Let me know how it worked out for you and if there's something wrong here, please do call it out.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>node</category>
      <category>tailwindcss</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
