<?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: Nitin Ranganath</title>
    <description>The latest articles on DEV Community by Nitin Ranganath (@itsnitinr).</description>
    <link>https://dev.to/itsnitinr</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%2F243850%2F2734d459-2216-478a-bbc9-4e2a636f96d5.png</url>
      <title>DEV Community: Nitin Ranganath</title>
      <link>https://dev.to/itsnitinr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/itsnitinr"/>
    <language>en</language>
    <item>
      <title>I built a social network for developers to showcase their projects</title>
      <dc:creator>Nitin Ranganath</dc:creator>
      <pubDate>Mon, 20 Sep 2021 11:45:13 +0000</pubDate>
      <link>https://dev.to/itsnitinr/i-built-a-social-network-for-developers-to-showcase-their-projects-m7j</link>
      <guid>https://dev.to/itsnitinr/i-built-a-social-network-for-developers-to-showcase-their-projects-m7j</guid>
      <description>&lt;p&gt;TL;DR: &lt;a href="https://driwwwle.com" rel="noopener noreferrer"&gt;Driwwwle&lt;/a&gt; is an open-source social network to showcase your projects with like, comments, notifications, profiles and real-time chat.&lt;/p&gt;

&lt;p&gt;As developers, we like to look out for new and exciting projects or products. However, finding them is not the easiest task out there. Sure, you can scroll through GitHub's trending section to find a lot of awesome products but what if it is closed source?&lt;/p&gt;

&lt;p&gt;Things aren't so hard for designers though. They can visit a website like Dribbble or Behance and enjoy the thousands of creative designs easily. What if we had something like Dribbble, but for developers?&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing Driwwwle
&lt;/h2&gt;

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

&lt;p&gt;Driwwwle is a social network for developers to showcase their projects or products with other developers across the globe. Just like any other social network out there, you can like posts, save them privately, leave a comment and follow your favorite developers to build your own personal feed.&lt;/p&gt;

&lt;p&gt;Some of the other features include:&lt;/p&gt;

&lt;p&gt;⚡ Server-side rendering with Next.js&lt;br&gt;
🍪 Cookie-based authorization with JSON web tokens&lt;br&gt;
📜 Infinite scrolling feed with React Query&lt;br&gt;
🖼️ Cloud image upload with Cloudinary&lt;br&gt;
❤️ Like, save, and comment on posts&lt;br&gt;
💬 Realtime chat with Socket.io&lt;br&gt;
🤝 Follow developers and build personal feed&lt;/p&gt;

&lt;p&gt;and a lot more..&lt;/p&gt;

&lt;p&gt;Sounds interesting? I would love for you to create an account on &lt;a href="https://driwwwle.com" rel="noopener noreferrer"&gt;Driwwwle&lt;/a&gt; and post your awesome creations.&lt;/p&gt;

&lt;p&gt;Did I mention that Driwwwle is also open-source? You can browse through the code on this GitHub repo:&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&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%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/itsnitinr" rel="noopener noreferrer"&gt;
        itsnitinr
      &lt;/a&gt; / &lt;a href="https://github.com/itsnitinr/driwwwle" rel="noopener noreferrer"&gt;
        driwwwle
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      The social network for developers. Discover creative websites and build a community.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/34748469/133837934-3584c5a0-e650-46c1-a0c7-7125d30fd145.png"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F34748469%2F133837934-3584c5a0-e650-46c1-a0c7-7125d30fd145.png" height="100" width="100"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Driwwwle&lt;/h1&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;The Social Network for Developers&lt;/h3&gt;
&lt;/div&gt;


&lt;p&gt;&lt;br&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/13d733958165e32065c0be8da9f4adec7d30640b0a488a71b53183fb1b672fd3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4e6578742e6a732d3030303030303f7374796c653d666c61742d737175617265266c6f676f3d6e6578742e6a73"&gt;&lt;img src="https://camo.githubusercontent.com/13d733958165e32065c0be8da9f4adec7d30640b0a488a71b53183fb1b672fd3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4e6578742e6a732d3030303030303f7374796c653d666c61742d737175617265266c6f676f3d6e6578742e6a73"&gt;&lt;/a&gt;&lt;br&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/a93574b4f7c90acfa85796029267a1a28ee51e8c4073675b19e096bf342980b0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d5461696c77696e644353532d3338423241433f7374796c653d666c61742d737175617265266c6f676f3d7461696c77696e642d637373266c6f676f436f6c6f723d7768697465"&gt;&lt;img src="https://camo.githubusercontent.com/a93574b4f7c90acfa85796029267a1a28ee51e8c4073675b19e096bf342980b0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d5461696c77696e644353532d3338423241433f7374796c653d666c61742d737175617265266c6f676f3d7461696c77696e642d637373266c6f676f436f6c6f723d7768697465"&gt;&lt;/a&gt;&lt;br&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/2ed691285a3c5eec6c2b2cd2d2bc610a09e39dab92e69a5999a5d1a43b873c4b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4a6176615363726970742d4637444631453f7374796c653d666c61742d737175617265266c6f676f3d6a617661736372697074266c6f676f436f6c6f723d626c61636b"&gt;&lt;img src="https://camo.githubusercontent.com/2ed691285a3c5eec6c2b2cd2d2bc610a09e39dab92e69a5999a5d1a43b873c4b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4a6176615363726970742d4637444631453f7374796c653d666c61742d737175617265266c6f676f3d6a617661736372697074266c6f676f436f6c6f723d626c61636b"&gt;&lt;/a&gt;&lt;br&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/0dbe782609190fa97bca453983a8eac8aa300225a2d7394a60486691e9b69de6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d457870726573732d3030303030303f7374796c653d666c61742d737175617265266c6f676f3d65787072657373266c6f676f436f6c6f723d7768697465"&gt;&lt;img src="https://camo.githubusercontent.com/0dbe782609190fa97bca453983a8eac8aa300225a2d7394a60486691e9b69de6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d457870726573732d3030303030303f7374796c653d666c61742d737175617265266c6f676f3d65787072657373266c6f676f436f6c6f723d7768697465"&gt;&lt;/a&gt;&lt;br&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/11f376c6895474f208db50031494c645283d736a46d2768e6a824e7965cac49d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4d6f6e676f44422d3437413234383f7374796c653d666c61742d737175617265266c6f676f3d6d6f6e676f6462266c6f676f436f6c6f723d7768697465"&gt;&lt;img src="https://camo.githubusercontent.com/11f376c6895474f208db50031494c645283d736a46d2768e6a824e7965cac49d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4d6f6e676f44422d3437413234383f7374796c653d666c61742d737175617265266c6f676f3d6d6f6e676f6462266c6f676f436f6c6f723d7768697465"&gt;&lt;/a&gt;&lt;br&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/c14fb8a7c24b9d2d0070b79bbaab879f5ecb986270dc6aaaa525b790bbf443bd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4a57542d3030303030303f7374796c653d666c61742d737175617265266c6f676f3d6a736f6e2d7765622d746f6b656e73266c6f676f436f6c6f723d7768697465"&gt;&lt;img src="https://camo.githubusercontent.com/c14fb8a7c24b9d2d0070b79bbaab879f5ecb986270dc6aaaa525b790bbf443bd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4a57542d3030303030303f7374796c653d666c61742d737175617265266c6f676f3d6a736f6e2d7765622d746f6b656e73266c6f676f436f6c6f723d7768697465"&gt;&lt;/a&gt;&lt;br&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/9bbc78485b726f1f645539798ae37877f8e9dadabcafa65261f0a4343b0eb7e0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4865747a6e65722d4435304332443f7374796c653d666c61742d737175617265266c6f676f3d6865747a6e6572266c6f676f436f6c6f723d7768697465"&gt;&lt;img src="https://camo.githubusercontent.com/9bbc78485b726f1f645539798ae37877f8e9dadabcafa65261f0a4343b0eb7e0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4865747a6e65722d4435304332443f7374796c653d666c61742d737175617265266c6f676f3d6865747a6e6572266c6f676f436f6c6f723d7768697465"&gt;&lt;/a&gt;&lt;br&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/21dd61919920425f2630c0765ac213a7d9612ad98d634a87a65778a4eecc97bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d536f636b65742e696f2d3031303130313f7374796c653d666c61742d737175617265266c6f676f3d736f636b65742e696f266c6f676f436f6c6f723d7768697465"&gt;&lt;img src="https://camo.githubusercontent.com/21dd61919920425f2630c0765ac213a7d9612ad98d634a87a65778a4eecc97bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d536f636b65742e696f2d3031303130313f7374796c653d666c61742d737175617265266c6f676f3d736f636b65742e696f266c6f676f436f6c6f723d7768697465"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;
&lt;br&gt;


&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Features&lt;/h3&gt;
&lt;/div&gt;

&lt;div&gt;
  &lt;p&gt;⚡ Server-side rendering with Next.js&lt;br&gt;
  🍪 Cookie-based authorization with JSON web tokens&lt;br&gt;
  📜 Infinite scrolling feed with React Query&lt;br&gt;
  🖼️ Cloud image upload with Cloudinary&lt;br&gt;
  ❤️ Like, save and comment on posts&lt;br&gt;
  💬 Realtime chat with Socket.io&lt;br&gt;
  🤝 Follow developers and build personal feed&lt;br&gt;
  and a lot more..&lt;/p&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Running Locally&lt;/h2&gt;

&lt;/div&gt;

&lt;p&gt;Clone this repository and install dependencies by running:&lt;/p&gt;

&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;npm install
#or
yarn install
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Create a new file named &lt;code&gt;config.env&lt;/code&gt; with the following environment variables in the root of the project folder:&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;PORT = 
MONGO_URI = 
JWT_SECRET = 
CLOUDINARY_CLOUD_NAME = 
CLOUDINARY_API_KEY = 
CLOUDINARY_API_SECRET = 
SENDGRID_API_KEY = 
SENDER_EMAIL = 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Create a new file named &lt;code&gt;.env.local&lt;/code&gt; with following configuration:&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;NEXT_PUBLIC_BASE_URL = http://localhost:3000
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;For development mode, run:&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;For production mode, run:&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;npm run build
npm start
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Visit &lt;a href="http://localhost:3000" rel="nofollow noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt; or your custom port environment variable to view the app.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Screenshots&lt;/h2&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/34748469/133844015-c1b49f42-95de-4b4c-93d6-0d74152578cc.png"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F34748469%2F133844015-c1b49f42-95de-4b4c-93d6-0d74152578cc.png" alt="Banner Image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;br&gt;
&lt;thead&gt;
&lt;br&gt;
&lt;tr&gt;
&lt;br&gt;
&lt;th&gt;Landing Page&lt;/th&gt;
&lt;br&gt;
&lt;th&gt;Search&lt;/th&gt;
&lt;br&gt;
&lt;/tr&gt;
&lt;br&gt;
&lt;/thead&gt;
&lt;br&gt;
&lt;tbody&gt;
&lt;br&gt;
&lt;tr&gt;
&lt;br&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/34748469/133844238-18e81ef2-ef31-4455-9b8f-08c71754fd97.png"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F34748469%2F133844238-18e81ef2-ef31-4455-9b8f-08c71754fd97.png" alt=""&gt;&lt;/a&gt;&lt;/td&gt;
&lt;br&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/34748469/133844365-d01ebbe2-5c37-4ed8-9337-efb6c15a4828.png"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F34748469%2F133844365-d01ebbe2-5c37-4ed8-9337-efb6c15a4828.png" alt=""&gt;&lt;/a&gt;&lt;/td&gt;
&lt;br&gt;
&lt;/tr&gt;
&lt;br&gt;
&lt;/tbody&gt;
&lt;br&gt;
&lt;/table&gt;&lt;/div&gt;&lt;br&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;br&gt;
&lt;thead&gt;
&lt;br&gt;
&lt;tr&gt;
&lt;br&gt;
&lt;th&gt;Personal Feed&lt;/th&gt;
&lt;br&gt;
&lt;/tr&gt;
&lt;br&gt;
&lt;/thead&gt;
&lt;br&gt;
&lt;/table&gt;&lt;/div&gt;…&lt;/p&gt;
&lt;/div&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/itsnitinr/driwwwle" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;
 

&lt;h2&gt;
  
  
  Some more screenshots
&lt;/h2&gt;

&lt;p&gt;A picture speaks a thousand words but more importantly, I hope it excites you enough to give Driwwwle a try. Here are some screenshots, thanks to &lt;a href="https://mockupbro.com/" rel="noopener noreferrer"&gt;MockupBro&lt;/a&gt; for the awesome mockups.&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%2Fr1ylr51nj7q2u3iblrbr.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%2Fr1ylr51nj7q2u3iblrbr.png" alt="Landing Page"&gt;&lt;/a&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%2Fk4lrx08hg7a1pk5uta5q.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%2Fk4lrx08hg7a1pk5uta5q.png" alt="Add New Post"&gt;&lt;/a&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%2F3lgifm57m1dpu7qgthjk.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%2F3lgifm57m1dpu7qgthjk.png" alt="Search"&gt;&lt;/a&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%2Fdhncxpfe4lk6snn13qmd.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%2Fdhncxpfe4lk6snn13qmd.png" alt="Feed"&gt;&lt;/a&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%2F5wm1iq8yf2gpyqeg0r8e.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%2F5wm1iq8yf2gpyqeg0r8e.png" alt="Posts &amp;amp; Profile page"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Suggestions and feedback welcome!
&lt;/h2&gt;

&lt;p&gt;Driwwwle is in its initial stages at the moment and I would highly appreciate any feedback, suggestions and questions you would like to provide. What features would you like to see? What seems unnecessary or what's causing difficulties? &lt;/p&gt;

&lt;p&gt;Thank you for your time and I await to see your posts on Driwwwle soon. Until then, have a nice day!&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>nextjs</category>
      <category>react</category>
      <category>javascript</category>
    </item>
    <item>
      <title>5 NPM Packages to Secure Your Node.js Backend in 5 Minutes</title>
      <dc:creator>Nitin Ranganath</dc:creator>
      <pubDate>Wed, 09 Jun 2021 13:59:17 +0000</pubDate>
      <link>https://dev.to/itsnitinr/5-npm-packages-to-secure-your-node-js-backend-in-5-minutes-2732</link>
      <guid>https://dev.to/itsnitinr/5-npm-packages-to-secure-your-node-js-backend-in-5-minutes-2732</guid>
      <description>&lt;p&gt;When you start to focus on the performance and security of your backend alongside the other features, you know that you're growing and maturing as a developer. It goes without saying but having some sort of security measure against common attacks is essential, even if it's just a hobby project.&lt;/p&gt;

&lt;p&gt;If you're new to security or want to quickly get started with some basic protection, these 5 NPM packages will help you get started in just a few minutes. The best part about these packages is that all you have to do is just install them and use them as middleware. It's that easy! &lt;/p&gt;

&lt;p&gt;In a hurry or just need the list of packages? Here are the 5 NPM packages that I'll be going over:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Package Name&lt;/th&gt;
&lt;th&gt;Package Link&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;helmet&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.npmjs.com/package/helmet" rel="noopener noreferrer"&gt;NPM Link&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;xss-clean&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.npmjs.com/package/xss-clean" rel="noopener noreferrer"&gt;NPM Link&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;hpp&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.npmjs.com/package/hpp" rel="noopener noreferrer"&gt;NPM Link&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;express-mongo-sanitize&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.npmjs.com/package/express-mongo-sanitize" rel="noopener noreferrer"&gt;NPM Link&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;express-rate-limit&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.npmjs.com/package/express-rate-limit" rel="noopener noreferrer"&gt;NPM Link&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Helmet
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt; Sets security-related HTTP response headers to protect against some well-known web vulnerabilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does it protect against:&lt;/strong&gt; Cross-site scripting attacks, cross-site injections, clickjacking, MIME sniffing and targeted attacks towards Express servers by disabling the &lt;code&gt;X-Powered-By&lt;/code&gt; header.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to use it:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

npm install helmet


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

&lt;/div&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;app&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;helmet&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;helmet&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Using helmet 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="nf"&gt;helmet&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="mi"&gt;1337&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;


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

&lt;/div&gt;

&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&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%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/helmetjs" rel="noopener noreferrer"&gt;
        helmetjs
      &lt;/a&gt; / &lt;a href="https://github.com/helmetjs/helmet" rel="noopener noreferrer"&gt;
        helmet
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Help secure Express apps with various HTTP headers
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Helmet&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;Help secure Express apps by setting HTTP response headers.&lt;/p&gt;

&lt;div class="highlight highlight-source-js notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-k"&gt;import&lt;/span&gt; &lt;span class="pl-s1"&gt;helmet&lt;/span&gt; &lt;span class="pl-k"&gt;from&lt;/span&gt; &lt;span class="pl-s"&gt;"helmet"&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;

&lt;span class="pl-k"&gt;const&lt;/span&gt; &lt;span class="pl-s1"&gt;app&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-en"&gt;express&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;

&lt;span class="pl-s1"&gt;app&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;use&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-en"&gt;helmet&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Helmet sets the following headers by default:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/helmetjs/helmet#content-security-policy" rel="noopener noreferrer"&gt;&lt;code&gt;Content-Security-Policy&lt;/code&gt;&lt;/a&gt;: A powerful allow-list of what can happen on your page which mitigates many attacks&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/helmetjs/helmet#cross-origin-opener-policy" rel="noopener noreferrer"&gt;&lt;code&gt;Cross-Origin-Opener-Policy&lt;/code&gt;&lt;/a&gt;: Helps process-isolate your page&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/helmetjs/helmet#cross-origin-resource-policy" rel="noopener noreferrer"&gt;&lt;code&gt;Cross-Origin-Resource-Policy&lt;/code&gt;&lt;/a&gt;: Blocks others from loading your resources cross-origin&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/helmetjs/helmet#origin-agent-cluster" rel="noopener noreferrer"&gt;&lt;code&gt;Origin-Agent-Cluster&lt;/code&gt;&lt;/a&gt;: Changes process isolation to be origin-based&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/helmetjs/helmet#referrer-policy" rel="noopener noreferrer"&gt;&lt;code&gt;Referrer-Policy&lt;/code&gt;&lt;/a&gt;: Controls the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer" rel="nofollow noopener noreferrer"&gt;&lt;code&gt;Referer&lt;/code&gt;&lt;/a&gt; header&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/helmetjs/helmet#strict-transport-security" rel="noopener noreferrer"&gt;&lt;code&gt;Strict-Transport-Security&lt;/code&gt;&lt;/a&gt;: Tells browsers to prefer HTTPS&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/helmetjs/helmet#x-content-type-options" rel="noopener noreferrer"&gt;&lt;code&gt;X-Content-Type-Options&lt;/code&gt;&lt;/a&gt;: Avoids &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#mime_sniffing" rel="nofollow noopener noreferrer"&gt;MIME sniffing&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/helmetjs/helmet#x-dns-prefetch-control" rel="noopener noreferrer"&gt;&lt;code&gt;X-DNS-Prefetch-Control&lt;/code&gt;&lt;/a&gt;: Controls DNS prefetching&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/helmetjs/helmet#x-download-options" rel="noopener noreferrer"&gt;&lt;code&gt;X-Download-Options&lt;/code&gt;&lt;/a&gt;: Forces downloads to be saved (Internet Explorer only)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/helmetjs/helmet#x-frame-options" rel="noopener noreferrer"&gt;&lt;code&gt;X-Frame-Options&lt;/code&gt;&lt;/a&gt;: Legacy header that mitigates &lt;a href="https://en.wikipedia.org/wiki/Clickjacking" rel="nofollow noopener noreferrer"&gt;clickjacking&lt;/a&gt; attacks&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/helmetjs/helmet#x-permitted-cross-domain-policies" rel="noopener noreferrer"&gt;&lt;code&gt;X-Permitted-Cross-Domain-Policies&lt;/code&gt;&lt;/a&gt;: Controls cross-domain behavior for Adobe products, like Acrobat&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/helmetjs/helmet#x-powered-by" rel="noopener noreferrer"&gt;&lt;code&gt;X-Powered-By&lt;/code&gt;&lt;/a&gt;: Info about the web server. Removed because it could be used in simple attacks&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/helmetjs/helmet#x-xss-protection" rel="noopener noreferrer"&gt;&lt;code&gt;X-XSS-Protection&lt;/code&gt;&lt;/a&gt;: Legacy header that tries…&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/helmetjs/helmet" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;h2&gt;
  
  
  XSS-Clean
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt; Sanitizes user input coming from POST request body (&lt;code&gt;req.body&lt;/code&gt;), GET request query (&lt;code&gt;req.query&lt;/code&gt;) and URL parameters (&lt;code&gt;req.params&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does it protect against:&lt;/strong&gt; Cross-site scripting / XSS attacks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to use it:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

npm install xss-clean


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

&lt;/div&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;app&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;xssClean&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;xss-clean&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Protect against XSS attacks, should come before any routes&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="nf"&gt;xssClean&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="mi"&gt;1337&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;


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

&lt;/div&gt;

&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&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%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/jsonmaur" rel="noopener noreferrer"&gt;
        jsonmaur
      &lt;/a&gt; / &lt;a href="https://github.com/jsonmaur/xss-clean" rel="noopener noreferrer"&gt;
        xss-clean
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Middleware to sanitize user input
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Announcement&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;This library has been deprecated. The implementation is quite simple, and I would suggest you copy the source code directly into your application using the &lt;a href="https://github.com/YahooArchive/xss-filters" rel="noopener noreferrer"&gt;xss-filters&lt;/a&gt; dependency, or look for alternative libraries with more features and attention. Thanks for your support.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;Node.js Connect middleware to sanitize user input coming from POST body, GET queries, and url params. Works with &lt;a href="http://expressjs.com/" rel="nofollow noopener noreferrer"&gt;Express&lt;/a&gt;, &lt;a href="http://restify.com/" rel="nofollow noopener noreferrer"&gt;Restify&lt;/a&gt;, or any other &lt;a href="https://github.com/senchalabs/connect" rel="noopener noreferrer"&gt;Connect&lt;/a&gt; app.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/jsonmaur/xss-clean#use" rel="noopener noreferrer"&gt;How to Use&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jsonmaur/xss-clean#license" rel="noopener noreferrer"&gt;License&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;How to Use&lt;/h2&gt;
&lt;/div&gt;

&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;npm install xss-clean --save&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="highlight highlight-source-js notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-k"&gt;const&lt;/span&gt; &lt;span class="pl-s1"&gt;restify&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-en"&gt;require&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-s"&gt;'restify'&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;
&lt;span class="pl-k"&gt;const&lt;/span&gt; &lt;span class="pl-s1"&gt;xss&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-en"&gt;require&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-s"&gt;'xss-clean'&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;

&lt;span class="pl-k"&gt;const&lt;/span&gt; &lt;span class="pl-s1"&gt;app&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-s1"&gt;restify&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;createServer&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;

&lt;span class="pl-s1"&gt;app&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;use&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-s1"&gt;restify&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;bodyParser&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;

&lt;span class="pl-c"&gt;// make sure this comes before any routes&lt;/span&gt;
&lt;span class="pl-s1"&gt;app&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;use&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-s1"&gt;xss&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;

&lt;span class="pl-s1"&gt;app&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;listen&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-c1"&gt;8080&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;This will sanitize any data in &lt;code&gt;req.body&lt;/code&gt;, &lt;code&gt;req.query&lt;/code&gt;, and &lt;code&gt;req.params&lt;/code&gt;. You can also…&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/jsonmaur/xss-clean" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;h2&gt;
  
  
  HPP
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt; Puts the array parameters in &lt;code&gt;req.query&lt;/code&gt; and/or &lt;code&gt;req.body&lt;/code&gt; asides and just selects the last parameter value to avoid HTTP Parameter Pollution attacks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does it protect against:&lt;/strong&gt; Bypassing input validations and denial of service (DoS) attacks by uncaught &lt;code&gt;TypeError&lt;/code&gt; in async code, leading to server crash.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to use it:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

npm install hpp


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

&lt;/div&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;app&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;hpp&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;hpp&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Protect against HPP, should come before any routes&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="nf"&gt;hpp&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="mi"&gt;1337&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;


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

&lt;/div&gt;

&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&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%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/analog-nico" rel="noopener noreferrer"&gt;
        analog-nico
      &lt;/a&gt; / &lt;a href="https://github.com/analog-nico/hpp" rel="noopener noreferrer"&gt;
        hpp
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Express middleware to protect against HTTP Parameter Pollution attacks
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;HPP&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="http://expressjs.com" rel="nofollow noopener noreferrer"&gt;Express&lt;/a&gt; middleware to &lt;strong&gt;protect against HTTP Parameter Pollution attacks&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://travis-ci.org/analog-nico/hpp" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/47767ba9b676b8f0a6a774c0567da3232cde1efa3d53a49988b82fef60b7fcfb/68747470733a2f2f7472617669732d63692e6f72672f616e616c6f672d6e69636f2f6870702e7376673f6272616e63683d6d6173746572" alt="Build Status"&gt;&lt;/a&gt; &lt;a href="https://coveralls.io/r/analog-nico/hpp?branch=master" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/34aed9e821627864e2dfe4dfed3f85524c1dc1280fff8872582e7ec79511f260/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f616e616c6f672d6e69636f2f6870702f62616467652e706e67" alt="Coverage Status"&gt;&lt;/a&gt; &lt;a href="https://david-dm.org/analog-nico/hpp" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/bbdd106b8e899fc39e3212819af65eb3351a2f510bca8f75fbe3f22d009ed77e/68747470733a2f2f64617669642d646d2e6f72672f616e616c6f672d6e69636f2f6870702e737667" alt="Dependency Status"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why?&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;Let &lt;a href="https://speakerdeck.com/ckarande/top-overlooked-security-threats-to-node-dot-js-web-applications?slide=48" rel="nofollow noopener noreferrer"&gt;Chetan Karande's slides&lt;/a&gt; do the explaining:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://speakerdeck.com/ckarande/top-overlooked-security-threats-to-node-dot-js-web-applications?slide=48" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fanalog-nico%2Fhppimg%2Fslide48.jpg" alt="Slide 48"&gt;&lt;/a&gt;
&lt;a href="https://speakerdeck.com/ckarande/top-overlooked-security-threats-to-node-dot-js-web-applications?slide=49" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fanalog-nico%2Fhppimg%2Fslide49.jpg" alt="Slide 49"&gt;&lt;/a&gt;
&lt;a href="https://speakerdeck.com/ckarande/top-overlooked-security-threats-to-node-dot-js-web-applications?slide=50" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fanalog-nico%2Fhppimg%2Fslide50.jpg" alt="Slide 50"&gt;&lt;/a&gt;
&lt;a href="https://speakerdeck.com/ckarande/top-overlooked-security-threats-to-node-dot-js-web-applications?slide=54" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fanalog-nico%2Fhppimg%2Fslide54.jpg" alt="Slide 54"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;...and exploits may allow &lt;a href="https://speakerdeck.com/ckarande/top-overlooked-security-threats-to-node-dot-js-web-applications?slide=57" rel="nofollow noopener noreferrer"&gt;bypassing the input validation&lt;/a&gt; or even result in &lt;a href="https://speakerdeck.com/ckarande/top-overlooked-security-threats-to-node-dot-js-web-applications?slide=55" rel="nofollow noopener noreferrer"&gt;denial of service&lt;/a&gt;.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;And HPP solves this how exactly?&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;HPP puts array parameters in &lt;code&gt;req.query&lt;/code&gt; and/or &lt;code&gt;req.body&lt;/code&gt; aside and just selects the last parameter value. You add the middleware and you are done.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Installation&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://npmjs.org/package/hpp" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/554e97a45c201b1b1b5f6e76c457d58583af06d711ca7e0f30d34260e4536fdb/68747470733a2f2f6e6f6465692e636f2f6e706d2f6870702e706e673f646f776e6c6f6164733d74727565" alt="NPM Stats"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a module for node.js and io.js and is installed via npm:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;npm install hpp --save&lt;/pre&gt;

&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Getting Started&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;Add the HPP middleware like this:&lt;/p&gt;
&lt;div class="highlight highlight-source-js notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-c"&gt;// ...&lt;/span&gt;
&lt;span class="pl-k"&gt;var&lt;/span&gt; &lt;span class="pl-s1"&gt;hpp&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-en"&gt;require&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-s"&gt;'hpp'&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
&lt;span class="pl-c"&gt;// ...&lt;/span&gt;
&lt;span class="pl-s1"&gt;app&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;use&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-s1"&gt;bodyParser&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;urlencoded&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt; &lt;span class="pl-c"&gt;// Make sure the body is parsed beforehand.&lt;/span&gt;

&lt;span class="pl-s1"&gt;app&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;use&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-s1"&gt;hpp&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt; &lt;span class="pl-c"&gt;// &amp;lt;- THIS IS THE NEW LINE&lt;/span&gt;

&lt;span class="pl-c"&gt;// Add your own middlewares afterwards, e.g.:&lt;/span&gt;
&lt;span class="pl-s1"&gt;app&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;get&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-s"&gt;'/search'&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt;&lt;/pre&gt;…
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/analog-nico/hpp" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Express Mongo Sanitize
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt; Searches for any keys in objects that begin with a &lt;code&gt;$&lt;/code&gt; sign or contain a &lt;code&gt;.&lt;/code&gt; from &lt;code&gt;req.body&lt;/code&gt;, &lt;code&gt;req.query&lt;/code&gt; or &lt;code&gt;req.params&lt;/code&gt; and either removes such keys and data or replaces the prohibited characters with another allowed character.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does it protect against:&lt;/strong&gt; MongoDB Operator Injection. Malicious users could send an object containing a &lt;code&gt;$&lt;/code&gt; operator, or including a &lt;code&gt;.&lt;/code&gt;, which could change the context of a database operation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to use it:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

npm install express-mongo-sanitize


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

&lt;/div&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;app&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;mongoSanitize&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-mongo-sanitize&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Remove all keys containing prohibited characters&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="nf"&gt;mongoSanitize&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="mi"&gt;1337&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;


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

&lt;/div&gt;

&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&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%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/fiznool" rel="noopener noreferrer"&gt;
        fiznool
      &lt;/a&gt; / &lt;a href="https://github.com/fiznool/express-mongo-sanitize" rel="noopener noreferrer"&gt;
        express-mongo-sanitize
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Sanitize your express payload to prevent MongoDB operator injection.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Express Mongo Sanitize&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;Express 4.x middleware which sanitizes user-supplied data to prevent MongoDB Operator Injection.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/fiznool/express-mongo-sanitize/actions/workflows/nodejs.yml" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/fiznool/express-mongo-sanitize/workflows/Node.js%20CI/badge.svg" alt="Build Status"&gt;&lt;/a&gt;
&lt;a href="https://www.npmjs.com/package/express-mongo-sanitize" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/377ab3a1d358a632113a5a6353608aad624adcb0d19e1f3400033e60fe6a410b/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f657870726573732d6d6f6e676f2d73616e6974697a65" alt="npm version"&gt;&lt;/a&gt;
&lt;a href="https://www.npmjs.com/package/express-mongo-sanitize" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/7988a6d90326f5d88e278359be94f55a9669bf77bd5136f79ad18deeb6d096a6/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f64772f657870726573732d6d6f6e676f2d73616e6974697a653f636f6c6f723d626c7565" alt="npm downloads per week"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/eca3ebbd08eb6849ccd8e01bf190fdf6d67fbc39474d027fa66db2187d075c17/68747470733a2f2f696d672e736869656c64732e696f2f6c6962726172696573696f2f72656c656173652f6e706d2f657870726573732d6d6f6e676f2d73616e6974697a65"&gt;&lt;img src="https://camo.githubusercontent.com/eca3ebbd08eb6849ccd8e01bf190fdf6d67fbc39474d027fa66db2187d075c17/68747470733a2f2f696d672e736869656c64732e696f2f6c6962726172696573696f2f72656c656173652f6e706d2f657870726573732d6d6f6e676f2d73616e6974697a65" alt="Dependency Status"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;What is this module for?&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;This module searches for any keys in objects that begin with a &lt;code&gt;$&lt;/code&gt; sign or contain a &lt;code&gt;.&lt;/code&gt;, from &lt;code&gt;req.body&lt;/code&gt;, &lt;code&gt;req.query&lt;/code&gt;, &lt;code&gt;req.headers&lt;/code&gt; or &lt;code&gt;req.params&lt;/code&gt;. It can then either:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;completely remove these keys and associated data from the object, or&lt;/li&gt;
&lt;li&gt;replace the prohibited characters with another allowed character.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The behaviour is governed by the passed option, &lt;code&gt;replaceWith&lt;/code&gt;. Set this option to have the sanitizer replace the prohibited characters with the character passed in.&lt;/p&gt;
&lt;p&gt;The config option &lt;code&gt;allowDots&lt;/code&gt; can be used to allow dots in the user-supplied data. In this case, only instances of &lt;code&gt;$&lt;/code&gt; will be sanitized.&lt;/p&gt;
&lt;p&gt;See the spec file for more examples.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why is it needed?&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Object keys starting with a &lt;code&gt;$&lt;/code&gt; or containing a &lt;code&gt;.&lt;/code&gt; are &lt;em&gt;reserved&lt;/em&gt; for use by MongoDB as operators…&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/fiznool/express-mongo-sanitize" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Express Rate Limit
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What does it do:&lt;/strong&gt; Used to limit IP addresses from making repeated requests to API endpoints. An example would be to rate limit an endpoint that is responsible for sending password reset emails, which can incur additional fees.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does it protect against:&lt;/strong&gt; Brute force, denial of service (DoS) and distributed denial of service (DDoS) attacks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to use it:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

npm install express-rate-limit


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

&lt;/div&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;app&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;rateLimit&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-rate-limit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Restrict all routes to only 100 requests per IP address every 1o minutes&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;limiter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;rateLimit&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;windowMs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="c1"&gt;// 10 minutes&lt;/span&gt;
    &lt;span class="na"&gt;max&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;                     &lt;span class="c1"&gt;// 100 requests per IP&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;limiter&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="mi"&gt;1337&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;


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

&lt;/div&gt;

&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&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%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/express-rate-limit" rel="noopener noreferrer"&gt;
        express-rate-limit
      &lt;/a&gt; / &lt;a href="https://github.com/express-rate-limit/express-rate-limit" rel="noopener noreferrer"&gt;
        express-rate-limit
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Basic rate-limiting middleware for the Express web server
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt; &lt;code&gt;express-rate-limit&lt;/code&gt; &lt;/h1&gt;
&lt;/div&gt;

&lt;div&gt;
&lt;p&gt;&lt;a href="https://github.com/express-rate-limit/express-rate-limit/actions/workflows/ci.yaml" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/c25f040705ccb7699e6f6f45b845858d7120ced37e6ea03abc69196393e653cf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f657870726573732d726174652d6c696d69742f657870726573732d726174652d6c696d69742f63692e79616d6c" alt="tests"&gt;&lt;/a&gt;
&lt;a href="https://npmjs.org/package/express-rate-limit" title="View this project on NPM" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e147805a5438940b6994e924fc7531a4b087dc185d7fb47e42204389fe5c9160/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f657870726573732d726174652d6c696d69742e737667" alt="npm version"&gt;&lt;/a&gt;
&lt;a href="https://www.npmjs.com/package/express-rate-limit" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/a130fcb0ce8ef67eee3164e74e0af310f0c44e5b1269ba4294dd7cf32b7a7e9a/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f646d2f657870726573732d726174652d6c696d6974" alt="npm downloads"&gt;&lt;/a&gt;
&lt;a href="https://github.com/express-rate-limit/express-rate-limitlicense.md" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/56717ebde0b93602a2dfca552707295cd686d8d1ea722f599b8fb3a222031477/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f6c2f657870726573732d726174652d6c696d6974" alt="license"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;Basic rate-limiting middleware for &lt;a href="http://expressjs.com/" rel="nofollow noopener noreferrer"&gt;Express&lt;/a&gt;. Use to
limit repeated requests to public APIs and/or endpoints such as password reset
Plays nice with
&lt;a href="https://www.npmjs.com/package/express-slow-down" rel="nofollow noopener noreferrer"&gt;express-slow-down&lt;/a&gt; and
&lt;a href="https://www.npmjs.com/package/ratelimit-header-parser" rel="nofollow noopener noreferrer"&gt;ratelimit-header-parser&lt;/a&gt;.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Usage&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;a href="https://express-rate-limit.mintlify.app/overview" rel="nofollow noopener noreferrer"&gt;full documentation&lt;/a&gt; is
available on-line.&lt;/p&gt;
&lt;div class="highlight highlight-source-ts notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-k"&gt;import&lt;/span&gt; &lt;span class="pl-kos"&gt;{&lt;/span&gt; &lt;span class="pl-s1"&gt;rateLimit&lt;/span&gt; &lt;span class="pl-kos"&gt;}&lt;/span&gt; &lt;span class="pl-k"&gt;from&lt;/span&gt; &lt;span class="pl-s"&gt;'express-rate-limit'&lt;/span&gt;

&lt;span class="pl-k"&gt;const&lt;/span&gt; &lt;span class="pl-s1"&gt;limiter&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-en"&gt;rateLimit&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-kos"&gt;{&lt;/span&gt;
    &lt;span class="pl-c1"&gt;windowMs&lt;/span&gt;: &lt;span class="pl-c1"&gt;15&lt;/span&gt; &lt;span class="pl-c1"&gt;*&lt;/span&gt; &lt;span class="pl-c1"&gt;60&lt;/span&gt; &lt;span class="pl-c1"&gt;*&lt;/span&gt; &lt;span class="pl-c1"&gt;1000&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-c"&gt;// 15 minutes&lt;/span&gt;
    &lt;span class="pl-c1"&gt;limit&lt;/span&gt;: &lt;span class="pl-c1"&gt;100&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-c"&gt;// Limit each IP to 100 requests per `window` (here, per 15 minutes).&lt;/span&gt;
    &lt;span class="pl-c1"&gt;standardHeaders&lt;/span&gt;: &lt;span class="pl-s"&gt;'draft-7'&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-c"&gt;// draft-6: `RateLimit-*` headers; draft-7: combined `RateLimit` header&lt;/span&gt;
    &lt;span class="pl-c1"&gt;legacyHeaders&lt;/span&gt;: &lt;span class="pl-c1"&gt;false&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-c"&gt;// Disable the `X-RateLimit-*` headers.&lt;/span&gt;
    &lt;span class="pl-c"&gt;// store: ... , // Redis, Memcached, etc. See below.&lt;/span&gt;
&lt;span class="pl-kos"&gt;}&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;

&lt;span class="pl-c"&gt;// Apply the rate limiting middleware to all requests.&lt;/span&gt;
&lt;span class="pl-s1"&gt;app&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;use&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-s1"&gt;limiter&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Data Stores&lt;/h3&gt;

&lt;/div&gt;
&lt;p&gt;The rate limiter comes with a built-in memory store, and supports a variety of
&lt;a href="https://express-rate-limit.mintlify.app/reference/stores" rel="nofollow noopener noreferrer"&gt;external data stores&lt;/a&gt;.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Configuration&lt;/h3&gt;

&lt;/div&gt;
&lt;p&gt;All function options may be async…&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/express-rate-limit/express-rate-limit" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;





&lt;p&gt;With these 5 NPM packages, you can make your Node.js + Express.js application much more secure in just 5 minutes. All of the packages above are extremely easy to use, just export and use as a middleware.&lt;/p&gt;

&lt;p&gt;What security precautions do you take? Or did I miss any of your favorite packages? Let me know in the discussion below and I'll be happy to hear your thoughts.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>node</category>
      <category>security</category>
      <category>beginners</category>
    </item>
    <item>
      <title>I Built a VSCode Inspired Developer Portfolio</title>
      <dc:creator>Nitin Ranganath</dc:creator>
      <pubDate>Sat, 08 May 2021 11:06:26 +0000</pubDate>
      <link>https://dev.to/itsnitinr/i-built-a-vscode-inspired-developer-portfolio-418g</link>
      <guid>https://dev.to/itsnitinr/i-built-a-vscode-inspired-developer-portfolio-418g</guid>
      <description>&lt;h2&gt;
  
  
  The Idea &amp;amp; Inspiration
&lt;/h2&gt;

&lt;p&gt;Truth be told, I've lost count of the number of amazing portfolio websites I've visited and been in awe of. I would try to take some inspiration from them and recreate them in my own way for my portfolio. However, after working on it for a few hours, I would come across a different design or idea and hop onto that instead. &lt;/p&gt;

&lt;p&gt;Due to this cycle, I have over 5-6 incomplete portfolio websites on my laptop, each having a different design. I love the creativity of some websites but I just can't make up my mind and stick to one design. So, what caught my eye this time? This amazing &lt;a href="https://vivek9patel.github.io/" rel="noopener noreferrer"&gt;Ubuntu-themed portfolio website&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I liked the idea so I thought of what tools do developers use. And what could be a better choice than the text editor most of us write code on: Visual Studio Code.&lt;/p&gt;

&lt;h2&gt;
  
  
  VSCode-Themed Portfolio
&lt;/h2&gt;

&lt;p&gt;If you're interested in exploring the project yourself, there's the link to it: &lt;a href="http://vscode-portfolio.vercel.app/" rel="noopener noreferrer"&gt;http://vscode-portfolio.vercel.app/&lt;/a&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://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/itsnitinr" rel="noopener noreferrer"&gt;
        itsnitinr
      &lt;/a&gt; / &lt;a href="https://github.com/itsnitinr/vscode-portfolio" rel="noopener noreferrer"&gt;
        vscode-portfolio
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A VSCode themed developer portfolio built using Next.js
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;vscode-portfolio&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://open.vscode.dev/itsnitinr/vscode-portfolio" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/5c14bf32feb408ebe2b0e2d3e2254eac614d626a8d1c82c736171d864731c45b/68747470733a2f2f6f70656e2e7673636f64652e6465762f6261646765732f6f70656e2d696e2d7673636f64652e737667" alt="Open is Visual Studio Code"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A Visual Studio Code themed developer portfolio website built with Next.js and deployed on Vercel.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/232a53df823a37249cd3ee5967301a2a2fda7e69bd448c32eec0f3915b5a508a/68747470733a2f2f696d6775722e636f6d2f4a584a396d704f2e676966"&gt;&lt;img src="https://camo.githubusercontent.com/232a53df823a37249cd3ee5967301a2a2fda7e69bd448c32eec0f3915b5a508a/68747470733a2f2f696d6775722e636f6d2f4a584a396d704f2e676966" alt="vscode-portfolio banner"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Features Roadmap&lt;/h2&gt;
&lt;/div&gt;
&lt;ul class="contains-task-list"&gt;
&lt;li class="task-list-item"&gt;
 Themes and customizations
&lt;ul class="contains-task-list"&gt;
&lt;li class="task-list-item"&gt;
 GitHub Dark (default)&lt;/li&gt;
&lt;li class="task-list-item"&gt;
 One Dark Pro&lt;/li&gt;
&lt;li class="task-list-item"&gt;
 Dracula&lt;/li&gt;
&lt;li class="task-list-item"&gt;
 Ayu&lt;/li&gt;
&lt;li class="task-list-item"&gt;
 Nord&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="task-list-item"&gt;
 Interactive custom terminal&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For other features and themes suggestions, please open an issue.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Environment Variables&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;For fetching your articles from dev.to, create an &lt;code&gt;.env.local&lt;/code&gt; file inside the project directory. Check the &lt;code&gt;.env.local.example&lt;/code&gt; file for more information.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Running Development Server&lt;/h2&gt;

&lt;/div&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;npm run dev
&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; or&lt;/span&gt;
yarn dev&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Open &lt;a href="http://localhost:3000" rel="nofollow noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt; with your browser to see the result.&lt;/p&gt;
&lt;p&gt;All VSCode related components can be found in the &lt;code&gt;components&lt;/code&gt; folder. To change the content of the portfolio, check out the &lt;code&gt;pages&lt;/code&gt; folder. To add or remove pages, modify &lt;code&gt;components/Sidebar.jsx&lt;/code&gt; and &lt;code&gt;components/Tabsbar.jsx&lt;/code&gt;.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Next.js Resources&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;To learn more about Next.js, take a look at the following resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://nextjs.org/docs" rel="nofollow noopener noreferrer"&gt;Next.js Documentation&lt;/a&gt; - learn about Next.js features and API.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://nextjs.org/learn" rel="nofollow noopener noreferrer"&gt;Learn Next.js&lt;/a&gt; - an interactive Next.js tutorial.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can…&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/itsnitinr/vscode-portfolio" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;This is a responsive and server-side rendered portfolio website built with Next.js, one of the technologies that I mentioned in my "Technologies I'll be Learning in 2021" post.&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/itsnitinr" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F243850%2F2734d459-2216-478a-bbc9-4e2a636f96d5.png" alt="itsnitinr"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/itsnitinr/technologies-that-i-ll-be-learning-in-2021-as-a-mern-stack-developer-with-resources-4pci" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Technologies That I'll Be Learning in 2021 as a MERN Stack Developer (with resources)&lt;/h2&gt;
      &lt;h3&gt;Nitin Ranganath ・ Jan 5 '21&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;#typescript&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#react&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#node&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;Right from the layout to appearance, I'm aiming to build a portfolio website that looks and feels like Visual Studio Code. This includes adding some cool stuff like themes, extensions, an interactive terminal, and probably more. &lt;/p&gt;

&lt;h2&gt;
  
  
  Can You Help Me?
&lt;/h2&gt;

&lt;p&gt;As you might've noticed, most of the pages are still empty because I wanted some feedback on the layout and VSCode aspects of the design. What type of design would you like to see for the other pages? What other features would you like to see in this project? I would highly appreciate if you leave a feedback, criticism or suggestion of any kind. &lt;/p&gt;

&lt;p&gt;The best part of the project is that since the other pages are yet to be built, you can fork the project and implement your own design which can help you stand out from the original project.&lt;/p&gt;

&lt;p&gt;If you're interested in contributing, the project is open-source and I would appreciate any sort of help. Otherwise, you can share it or star the repo, if you want to of course.  &lt;/p&gt;

</description>
      <category>showdev</category>
      <category>webdev</category>
      <category>react</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>5 Key Takeaways from my First Freelance Project</title>
      <dc:creator>Nitin Ranganath</dc:creator>
      <pubDate>Thu, 25 Mar 2021 06:00:58 +0000</pubDate>
      <link>https://dev.to/itsnitinr/5-key-takeaways-from-my-first-freelance-project-530a</link>
      <guid>https://dev.to/itsnitinr/5-key-takeaways-from-my-first-freelance-project-530a</guid>
      <description>&lt;p&gt;Getting your first client as a freelancer is usually a giant stepping stone that a lot of the developers, especially the newer ones, look forward to. The satisfaction and confidence you receive after successfully building an actual product that might be used by hundreds or even thousands of users is unmatched and makes all your hard work worth it. I'm grateful to have been on that path recently after building an e-commerce platform for a PCB manufacturing startup and I'd love to share some of my insights and tips that could help you make the most out of your first freelance job. Without further ado, here are five of my key takeaways:&lt;/p&gt;

&lt;h2&gt;
  
  
  Don't Underestimate Yourself
&lt;/h2&gt;

&lt;p&gt;While this may also be interpreted as trusting in yourself and the skills you've acquired in the past few months or years, what I really mean to convey is that &lt;strong&gt;don't undersell yourself just because you're new&lt;/strong&gt;. It is undeniable that you may lack professional experience as you're beginning but that does not make you any less professional in terms of your code and the efforts you'll be putting in. Yes, you may be paid lesser than an experienced freelance developer and that's totally fine. It may be difficult to strike the perfect deal but make sure the project you're taking on is worth your time and efforts.&lt;/p&gt;

&lt;p&gt;From my experience, the excitement of learning and implementing new things was more fruitful to me more than the paycheck. Think over the project requirements, devise a plan, and don't be hesitant in asking for what you feel you deserve. That being said, pay emphasis on the things you'll be learning along the way but don't let yourself be exploited just to get that client you've been waiting for.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lay Down the Deliverables
&lt;/h2&gt;

&lt;p&gt;I find it really essential to let your client know exactly what you'll be providing them in the beginning itself to avoid unexpected surprises later. &lt;strong&gt;Create a concise document, write down the features and functionalities you'll be implementing and share them with your client&lt;/strong&gt;. This is something I regret not doing. Few weeks into the project, I was asked to implement some features I wasn't expecting. &lt;/p&gt;

&lt;p&gt;Albeit a great learning experience, it helps to know these things in advance to properly plan and execute them to the fullest of your capabilities. Moreover, you can keep this document as a reference for yourself to keep track of the things you've completed and yet to do.&lt;/p&gt;

&lt;h2&gt;
  
  
  Break Down The Project Into Milestones
&lt;/h2&gt;

&lt;p&gt;You must've heard quite a lot about breaking down tasks into smaller chunks or subtasks. The same principle applies here. This makes the project less overwhelming and less intimidating, allowing you to focus on a particular task at any given time. A simple example would be to &lt;strong&gt;dissect the project you'll be building into features and functionalities&lt;/strong&gt; like authentication and further breaking it down into frontend (pages, components, state management) and backend (routes, controllers, models) tasks.&lt;/p&gt;

&lt;p&gt;You can also use a project management tool like Trello or Notion to keep track of tasks to do, in progress, to design, to test, and whatever else feels appropriate. Combine all the related tasks into milestones. If possible, you can structure your payouts in such a way that you get paid a fraction of the total amount after achieving each milestone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Communication, really, is the key
&lt;/h2&gt;

&lt;p&gt;The heading seems pretty self-explanatory for this one. However, people tend to undervalue this particular statement. Right from the start, I maintained professional but friendly communication with my client on an instant messaging platform. In case you're skeptical about sharing your phone number, platforms like Discord, Telegram, or Slack are perfect for such use-cases. Even a simple e-mail communication is much better than no or rare communication between you and your client. &lt;/p&gt;

&lt;p&gt;The reason I included this as a key takeaway is that this communication helped me put worth my own ideas, implementations and even revise my client's plans in a better way. This &lt;strong&gt;shows that you have a positive attitude and interest towards the projects and clients will genuinely appreciate this&lt;/strong&gt;. Moreover, the chances of getting further opportunities and referrals from them are pretty high too. &lt;/p&gt;

&lt;h2&gt;
  
  
  Don't Shy Away From Asking for a Testimonial
&lt;/h2&gt;

&lt;p&gt;Once you complete the project successfully, I would highly recommend you ask your client for their experience working with you and a small testimonial regarding the same. I'm sure that most of the clients would gladly agree to it. **Having a well-written and genuine testimonial alongside the projects section of your portfolio enhances it by a great margin **and leads to more opportunities in the future. It's also great for identifying the areas in which you can further improve. &lt;/p&gt;

&lt;p&gt;More than adding credibility to your skills and portfolio, receiving positive feedback truly sparks happiness for the hard work you've been putting in for weeks or months. And in the end, being able to help the people around you through your skills and knowledge might just be what truly matters.&lt;/p&gt;




&lt;p&gt;So that was some of the lessons I've learned from my first freelance project. Did I miss out on anything? Want to share your first freelance experience or leave some feedback? Drop a comment down below or tweet it to me.  &lt;/p&gt;

</description>
      <category>freelance</category>
      <category>career</category>
      <category>webdev</category>
      <category>freelancing</category>
    </item>
    <item>
      <title>Build A Crypto Discord Bot using Discord.js</title>
      <dc:creator>Nitin Ranganath</dc:creator>
      <pubDate>Mon, 08 Mar 2021 04:41:41 +0000</pubDate>
      <link>https://dev.to/itsnitinr/build-a-crypto-discord-bot-using-discord-js-4c33</link>
      <guid>https://dev.to/itsnitinr/build-a-crypto-discord-bot-using-discord-js-4c33</guid>
      <description>&lt;p&gt;Discord is one of the best platforms for developers to communicate for multiple reasons: the ability to create your own community (or server), talk to others using voice channels, and overall an amazing instant messaging platform. However, with the help of bots, the experience just becomes way more interesting and easier thanks to the automation and features these bots provide. There's a bot for pretty much everything. May it be for helping you manage your server or just sending you memes.&lt;/p&gt;

&lt;p&gt;In this article, we'll be building our own Discord bot using &lt;code&gt;discord.js&lt;/code&gt; which will allow us to program our own bot using NodeJS. If you're not familiar with NodeJS or JavaScript in general, I'd highly encourage you to check those out first so that you can follow along with ease. Regardless, I'll still be explaining all of the code I write for your understanding. Let's get started!&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&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%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/itsnitinr" rel="noopener noreferrer"&gt;
        itsnitinr
      &lt;/a&gt; / &lt;a href="https://github.com/itsnitinr/crypto-discord-bot" rel="noopener noreferrer"&gt;
        crypto-discord-bot
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A discord bot that fetches cryptocurrency prices and news.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;crypto-discord-bot&lt;/h1&gt;

&lt;/div&gt;
&lt;p&gt;A discord bot that fetches cryptocurrency prices and news.&lt;/p&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;!ping&lt;/td&gt;
&lt;td&gt;Checks if the bot is online and working&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;!price  &amp;lt;vs_currency&amp;gt;&lt;/td&gt;
&lt;td&gt;Fetches the price of a crypto with respect to another currency or cryptocurrency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;!news&lt;/td&gt;
&lt;td&gt;Fetches the latest news related to cryptocurrency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;!help&lt;/td&gt;
&lt;td&gt;Replies with all commands available and their description&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;To run the bot:&lt;/h2&gt;

&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Clone the repo&lt;/li&gt;
&lt;li&gt;Create an &lt;code&gt;.env&lt;/code&gt; file and add &lt;code&gt;DISCORD_BOT_TOKEN&lt;/code&gt; and &lt;code&gt;NEWS_API_KEY&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run the bot using &lt;code&gt;node bot&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Credits&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://discord.js.org/" rel="nofollow noopener noreferrer"&gt;DiscordJS&lt;/a&gt;
&lt;a href="https://www.coingecko.com/" rel="nofollow noopener noreferrer"&gt;CoinGecko&lt;/a&gt;
&lt;a href="http://newsapi.org/" rel="nofollow noopener noreferrer"&gt;News API&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/itsnitinr/crypto-discord-bot" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;h2&gt;
  
  
  What we're building
&lt;/h2&gt;

&lt;p&gt;Today, we'll be building a simple Discord bot that will fetch the price of various cryptocurrencies to get familiar with &lt;code&gt;discord.js&lt;/code&gt;. But you can feel free to play around and build something else as well since the concepts will remain the same. I'll be using an API to fetch the prices so you can use a different API for a completely different purpose.&lt;/p&gt;

&lt;p&gt;Our aims for today will be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Register our bot to Discord and get the bot token&lt;/li&gt;
&lt;li&gt;Add a command to ping our bot and check if it’s working&lt;/li&gt;
&lt;li&gt;Add a command to our bot which will fetch the price of a cryptocurrency with respect to another currency or cryptocurrency&lt;/li&gt;
&lt;li&gt;Add a command to get the latest news related to cryptocurrencies&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Getting Bot Token from Discord
&lt;/h2&gt;

&lt;p&gt;The first step towards creating our own bot is to register it with Discord and get a token to access it. So, let's head on over to the &lt;a href="https://discord.com/developers/applications" rel="noopener noreferrer"&gt;Discord Developer Portal&lt;/a&gt; and fill in some details. You'll need to login into your Discord account if you haven’t already.&lt;/p&gt;

&lt;p&gt;Once logged in, you'll be greeted with a screen like this:&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%2Fimgur.com%2FrSwRxPB.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%2Fimgur.com%2FrSwRxPB.png" alt="Step 1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To create a bot, press the &lt;code&gt;New Application&lt;/code&gt; button on the top right corner of your screen and you'll be asked to enter a name for your bot. I'll be naming it 'Crypto Bot' for now.&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%2Fimgur.com%2FRTMelqX.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%2Fimgur.com%2FRTMelqX.png" alt="Step 2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you can customize all the general information such as name, description, and icon as per your liking. Make sure to save your changes. Now, click on the &lt;code&gt;Bot&lt;/code&gt; tab present in the settings sidebar on the left side.&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%2Fimgur.com%2FSwygfzM.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%2Fimgur.com%2FSwygfzM.png" alt="Step 3"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the bot page, you will see a screen like this from which you can copy or regenerate your token.&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%2Fimgur.com%2FNmXIhBW.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%2Fimgur.com%2FNmXIhBW.png" alt="Step 4"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy the token and &lt;strong&gt;make sure you keep it safe and secure.&lt;/strong&gt; This is a private token which you should not share with anyone and especially not put it up on GitHub or else people will be able to take actions on behalf of your bot, which you certainly don't want.&lt;/p&gt;

&lt;p&gt;Finally, let's authorize our bot and add it to our server. For that, click on the &lt;code&gt;OAuth2&lt;/code&gt; tab and tick on the bot scope in the scopes section and send messages &amp;amp; embed links permissions in the bot permissions section.&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%2Fimgur.com%2FvzLqxbO.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%2Fimgur.com%2FvzLqxbO.png" alt="Authorize"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Copy the OAuth2 link and open it up on your browser. You'll be asked to select the server in which you want to bot to join. Make sure you have permission to add bots to your server.&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%2Fimgur.com%2F1mVtIeD.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%2Fimgur.com%2F1mVtIeD.png" alt="Auth Final"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Awesome, we're ready to get started with programming our bot with NodeJS &amp;amp; Discord.js in the next section.&lt;/p&gt;

&lt;h2&gt;
  
  
  Initial Setup
&lt;/h2&gt;

&lt;p&gt;Now that we have our bot token, we can get started with the code. Make a directory for your code and change into that directory on your terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;crypto-discord-bot
&lt;span class="nb"&gt;cd &lt;/span&gt;crypto-discord-bot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside this directory, use the &lt;code&gt;npm init&lt;/code&gt; command to set up an NPM package and generate the &lt;code&gt;package.json&lt;/code&gt; file.&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%2Fimgur.com%2FTT98SQZ.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%2Fimgur.com%2FTT98SQZ.png" alt="NPM Init"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For this project, we'll be having 2 dependencies: &lt;code&gt;discord.js&lt;/code&gt;, a library that will help us to interact with the Discord API easily, and &lt;code&gt;dotenv&lt;/code&gt;, which we'll be using to create environment variables for storing our bot token and other API keys. Let's go ahead and install those using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install discord.js dotenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Go ahead and open up the folder using your favorite text editor or IDE and let's begin coding.&lt;/p&gt;

&lt;p&gt;Start by creating 3 new files in the project folder: &lt;code&gt;bot.js&lt;/code&gt;, which will contain the source code for our Discord bot,&lt;code&gt;.env&lt;/code&gt;, for storing confidential information and API keys, and &lt;code&gt;.gitignore&lt;/code&gt; to exclude the &lt;code&gt;.env&lt;/code&gt; and &lt;code&gt;node_modules&lt;/code&gt; folder from being pushed to our GitHub. If you're not going to initialize Git, you can skip the &lt;code&gt;.gitignore&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;Our folder structure looks something like this now:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;crypto-discord-bot
    - bot.js
    - .env
    - .gitignore
    - node_modules
    - package.json
    - package-lock.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside &lt;strong&gt;&lt;code&gt;.gitignore&lt;/code&gt;&lt;/strong&gt;, add the following lines of code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node_modules/
.env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, inside the &lt;strong&gt;&lt;code&gt;.env&lt;/code&gt;&lt;/strong&gt; file, let's paste the bot token that we got from Discord. In case you lost the token, you can go back to the &lt;a href="https://discord.com/developers/applications" rel="noopener noreferrer"&gt;Discord Developer Portal&lt;/a&gt; and copy your token again. This is how your &lt;code&gt;.env&lt;/code&gt; file should look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DISCORD_BOT_TOKEN = ODE2NTk2MTQwOTY2ODA1NTM1.YD9Qaw.uTwkqds9EIapoJ_zJQGX2PAYOWw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;DISCORD_BOT_TOKEN&lt;/code&gt; is like a variable whose value can be accessed through &lt;code&gt;process.env.DISCORD_BOT_TOKEN&lt;/code&gt;. These are known as environment variables. If you’re wondering why we are using environment variables to store our bot token, it’s mainly because we don’t want to reveal the token as others can misuse it. Make sure you do not reveal your bot token to anyone or upload it onto the internet.&lt;/p&gt;

&lt;p&gt;Time for some actual JavaScript code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up Our  Bot
&lt;/h2&gt;

&lt;p&gt;If you notice, our bot is currently offline on our server. To make it online, let's write some code which I'll explain shortly.&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="c1"&gt;// Require dependencies&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;Client&lt;/span&gt; &lt;span class="p"&gt;}&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;discord.js&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;dotenv&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;dotenv&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Load environment variables&lt;/span&gt;
&lt;span class="nx"&gt;dotenv&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;// Create a bot instance&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bot&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// Log our bot in&lt;/span&gt;
&lt;span class="nx"&gt;bot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;login&lt;/span&gt;&lt;span class="p"&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;DISCORD_BOT_TOKEN&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As soon as you run this file using &lt;code&gt;node bot&lt;/code&gt;, you'll see that our bot becomes online and we have successfully logged in. In case you see an error, please make sure that you've spelled the environment variable just like you did in the &lt;code&gt;.env&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;In the first few lines of the code, all I did was just require the dependencies which our bot needs which are the &lt;code&gt;discord.js&lt;/code&gt; library and &lt;code&gt;dotenv&lt;/code&gt; . Then, to use environment variables in our file, we need to first load it by calling the &lt;code&gt;.config()&lt;/code&gt; method on &lt;code&gt;dotenv&lt;/code&gt;. As you can see, I've only imported the &lt;code&gt;Client&lt;/code&gt; class from &lt;code&gt;discord.js&lt;/code&gt; library since that's all we need for our purpose. Our bot will act as the client through which we’ll interact with Discord.&lt;/p&gt;

&lt;p&gt;Let's move on to logging in as our bot. To do that, I've made an instance of the &lt;code&gt;Client&lt;/code&gt; class and assigned it to a constant named bot. We can call several methods on the &lt;code&gt;bot&lt;/code&gt; instance. For logging in, we use the &lt;code&gt;.login()&lt;/code&gt; method which takes the bot token as a required parameter. Instead of pasting the bot token directly, we can access it from the &lt;code&gt;.env&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/itsnitinr/crypto-discord-bot/commit/6afa5c53f2cb0afce28ef19e37f950c3515295e8" rel="noopener noreferrer"&gt;Commit till this part&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Ping Command
&lt;/h2&gt;

&lt;p&gt;Here we go, our first command for our bot: &lt;code&gt;!ping&lt;/code&gt;. This command is used to check if the bot is working or not. If it is working, the bot will reply back with 'I am working’ to let us know. In case we don't receive any reply from our bot, we can safely assume that there was some kind of error or our bot is down. Let's break this down into small tasks: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Log to the console when the bot is ready&lt;/li&gt;
&lt;li&gt;Listen for messages and check if it matches any of our commands&lt;/li&gt;
&lt;li&gt;Check if the message was sent by a user or a bot&lt;/li&gt;
&lt;li&gt;Respond appropriately to the message&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In Discord, every action can be considered an event. So we can listen for messages using the &lt;code&gt;.on()&lt;/code&gt; method listening for &lt;code&gt;message&lt;/code&gt; on the client and passing it an async (since we'll be making API calls in the upcoming commands and even &lt;code&gt;discord.js&lt;/code&gt; returns promises) callback function with message as the parameter, like this: &lt;code&gt;bot.on('message', async (message) =&amp;gt; ...do something)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Let us first tackle our first subtask, which is to log to the console when our bot has logged in and is ready to be used. This is pretty simple as we only have to listen for the &lt;code&gt;ready&lt;/code&gt; event and &lt;code&gt;console.log()&lt;/code&gt; in our callback function. The code will be somewhat like this:&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="c1"&gt;// Log to console when the bot is ready&lt;/span&gt;
&lt;span class="nx"&gt;bot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ready&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="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;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;bot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; is up and running!`&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;Now, let's listen for messages and respond to the &lt;code&gt;!ping&lt;/code&gt; command.&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="c1"&gt;// Reply to user messages&lt;/span&gt;
&lt;span class="nx"&gt;bot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;message&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;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="c1"&gt;// Do not reply if message was sent by bot&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;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;author&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bot&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="c1"&gt;// Reply to !ping&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;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;!ping&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;return&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reply&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 am working!&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above snippet of code, we have an event listener listening for &lt;code&gt;message&lt;/code&gt; event. Once a message has been sent to the channel, we first check if the message's author is a bot or not. We can do this by accessing &lt;code&gt;message.author.bot&lt;/code&gt;. This will return true if the message was sent by a bot and false if it was sent by a user.&lt;/p&gt;

&lt;p&gt;Then, we check if the message starts with &lt;code&gt;!ping&lt;/code&gt; which is our command for pinging our bot. Since we're only checking if the message starts with &lt;code&gt;!ping&lt;/code&gt;, other messages such as !ping 123 or !ping abc will also trigger the ping functionality. You can change the behavior to strictly check for &lt;code&gt;!ping&lt;/code&gt; only if you want but I'll go with the starts with functionality for now. To reply to the message, we use the &lt;code&gt;.reply()&lt;/code&gt; method on &lt;code&gt;message&lt;/code&gt;. And believe it or not, it is as simple as that.&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%2Fimgur.com%2FQn3xVZ4.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%2Fimgur.com%2FQn3xVZ4.png" alt="Ping Demo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can append the above 2 code snippets below your previous code and we'll be good to go and implement our primary functionality, getting the crypto prices, in the next section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/itsnitinr/crypto-discord-bot/commit/de3c7c70fb2e68872ef6723b0d18794f7b23d165" rel="noopener noreferrer"&gt;Commit till this part&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Price Command
&lt;/h2&gt;

&lt;p&gt;Moving onto one of the core functionalities of our: fetching a price of a cryptocurrency with respect to another currency to compare it with. For this, we'll be using the &lt;a href="https://www.coingecko.com/en/api" rel="noopener noreferrer"&gt;CoinGecko API&lt;/a&gt; which is a free API that provides us an endpoint to achieve the functionality we want. Before we move on that, let's once again break our tasks into few subtasks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check if the message sent by the user starts with &lt;code&gt;!price&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Check if the user has passed 2 arguments along with it: the crypto and the currency to compare with&lt;/li&gt;
&lt;li&gt;Get the price from CoinGecko API if the user has passed 2 arguments&lt;/li&gt;
&lt;li&gt;Check if we have received a proper response with data from the API. If so, reply to the user's message with the price. If not, reply to the user notifying that there was an error.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To tackle our first subtask, we can use the inbuilt &lt;code&gt;.startsWith()&lt;/code&gt; method to check if the message starts with !price. To check if we have 2 arguments, we can split the string and use the spread (&lt;code&gt;...&lt;/code&gt;) operator for accumulating the arguments passed by the user in an array. &lt;/p&gt;

&lt;p&gt;If the length of the &lt;code&gt;args&lt;/code&gt; array is not 2, it means that the user has either passed too few arguments or too many arguments. For fetching the price from the API, we'll use the &lt;code&gt;axios&lt;/code&gt; package. You can do this by executing 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;npm &lt;span class="nb"&gt;install &lt;/span&gt;axios
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once done, import it into the &lt;code&gt;bot.js&lt;/code&gt; by adding this line below the other require statements:&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="c1"&gt;// Require dependencies&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;Client&lt;/span&gt; &lt;span class="p"&gt;}&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;discord.js&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;dotenv&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;dotenv&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;axios&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;axios&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;     &lt;span class="c1"&gt;// New line that we added&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The API endpoint that we'll be using to fetch the price will be: &lt;code&gt;https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&amp;amp;vs_currencies=usd&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The response from this API endpoint looks something like this:&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="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"bitcoin"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"usd"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;47575&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This API endpoint takes 2 parameters: ids where we'll be passing the name of the crypto that the user sent in the message and vs_currencies where we'll be passing the currency that we want to compare it against, again taken from the user's message.&lt;/p&gt;

&lt;p&gt;Here's the final code for all the functionality we discussed above:&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="c1"&gt;// Reply to !price&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;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;!price&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;// Get the params&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;command&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&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;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt; &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// Check if there are two arguments present&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;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="mi"&gt;2&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="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;You must provide the crypto and the currency to compare with!&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;else&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;coin&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;vsCurrency&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;args&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;// Get crypto price from coingecko API&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="s2"&gt;`https://api.coingecko.com/api/v3/simple/price?ids=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;coin&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;amp;vs_currencies=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;vsCurrency&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="c1"&gt;// Check if data exists&lt;/span&gt;
        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;coin&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="nx"&gt;vsCurrency&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="nc"&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;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="s2"&gt;`The current price of 1 &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;coin&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;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;coin&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="nx"&gt;vsCurrency&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;vsCurrency&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="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Please check your inputs. For example: !price bitcoin usd&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fimgur.com%2FWmI5g7O.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%2Fimgur.com%2FWmI5g7O.png" alt="Price Demo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can add this code right below your existing code for the &lt;code&gt;!ping&lt;/code&gt; command such that your message event listener function. Here's the &lt;a href="https://github.com/itsnitinr/crypto-discord-bot/commit/328ee0808bdf40cd54277f1925d2249b45f518f0" rel="noopener noreferrer"&gt;GitHub commit&lt;/a&gt; with the complete code till this section&lt;/p&gt;

&lt;h2&gt;
  
  
  The News Command
&lt;/h2&gt;

&lt;p&gt;The next core functionality that we'll be implementing is to get the latest news article related to crypto. As you might have guessed, this is fairly similar to the price command. We'll again be using an API to get the news article. This time, the API will be from &lt;a href="https://newsapi.org/" rel="noopener noreferrer"&gt;News API&lt;/a&gt;, which is free but you'll have to create an account in order to generate your API key. So head on over to &lt;a href="https://newsapi.org/" rel="noopener noreferrer"&gt;News API&lt;/a&gt; and generate your free API key.&lt;/p&gt;

&lt;p&gt;Once you're done with the registration, copy your API key and paste it to the &lt;code&gt;.env&lt;/code&gt; file like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DISCORD_BOT_TOKEN = ODE2NTk2MTQwOTY2ODA1NTM1.YD9Qaw.uTwkqds9EIapoJ_zJQGX2PAYOWw
NEWS_API_KEY = 6094f663e14952f986c002c636010243
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once again, I would like to remind you not to share these API keys or bot tokens with anyone. I’ve shown my bot token for tutorial purposes and will be discarding it shortly.&lt;/p&gt;

&lt;p&gt;Now, let's check out the API endpoint that we'll be using and the response structure.&lt;/p&gt;

&lt;p&gt;The endpoint for our purpose will be: &lt;code&gt;https://newsapi.org/v2/everything?q=crypto&amp;amp;apiKey=${process.env.NEWS_API_KEY}&amp;amp;pageSize=1&amp;amp;sortBy=publishedAt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;q&lt;/code&gt; parameter stands for the query for which we've passed crypto as the value since we only need those articles that are related to cryptocurrency. We'll also have to send our &lt;code&gt;apiKey&lt;/code&gt; as a parameter which we can get from the &lt;code&gt;.env&lt;/code&gt; file. The &lt;code&gt;pageSize&lt;/code&gt; parameter determines how many articles we'll receive from the API endpoint at a time. Since we need only 1 article, we've set the value to 1. Finally, we can also sort the articles as per rating, publish date, and relevance. Since we need the latest article, we'll set &lt;code&gt;sortBy&lt;/code&gt; to publishedAt so that we get the latest article.&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="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ok"&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"totalResults"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7503&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"articles"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Business Wire"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"author"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Cipher Mining Inc., a Newly Formed US-based Bitcoin Mining Company, to Become a Publicly Traded Company via a Merger with Good Works Acquisition Corp."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"HOUSTON &amp;amp; NEW YORK--(BUSINESS WIRE)--Cipher Mining Technologies Inc. (“Cipher Mining”), a newly formed U.S.-based Bitcoin mining operation, and Good Works Acquisition Corp. (Nasdaq: GWAC) (“Good Works”), a U.S. publicly-traded special purpose acquisition comp…"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://www.businesswire.com/news/home/20210305005234/en/Cipher-Mining-Inc.-a-Newly-Formed-US-based-Bitcoin-Mining-Company-to-Become-a-Publicly-Traded-Company-via-a-Merger-with-Good-Works-Acquisition-Corp."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"urlToImage"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://www.businesswire.com/images/bwlogo_square.png"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"publishedAt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2021-03-05T11:51:19Z"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"HOUSTON &amp;amp;amp; NEW YORK--(BUSINESS WIRE)--Cipher Mining Technologies Inc. (Cipher Mining), a newly formed U.S.-based Bitcoin mining operation, and Good Works Acquisition Corp. (Nasdaq: GWAC) (Good Wor… [+17142 chars]"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Following the steps from the last command, here's how the code will look like:&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="c1"&gt;// Reply to !news&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;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;!news&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;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="s2"&gt;`https://newsapi.org/v2/everything?q=crypto&amp;amp;apiKey=&lt;/span&gt;&lt;span class="p"&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;NEWS_API_KEY&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;amp;pageSize=1&amp;amp;sortBy=publishedAt`&lt;/span&gt;
      &lt;span class="p"&gt;);&lt;/span&gt;

      &lt;span class="c1"&gt;// Destructure useful data from response&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;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;source&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;description&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;articles&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="s2"&gt;`Latest news related to crypto:\n
        Title: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;\n
        Description:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;\n
        Source: &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;\n
        Link to full article: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;url&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="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;There was an error. Please try again later.&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;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fimgur.com%2FxWhb08j.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%2Fimgur.com%2FxWhb08j.png" alt="News demo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All you need to do now is to append the code below your price feature code. And we've successfully implemented the news feature as well. Yay! If you faced any difficulties, you can cross check your code with &lt;a href="https://github.com/itsnitinr/crypto-discord-bot/commit/2a1ccf288449653668ffb284ecfc9a08ad5f84f5" rel="noopener noreferrer"&gt;this commit&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  The Help Command
&lt;/h2&gt;

&lt;p&gt;Alright, time to implement one last feature, an easy one too. The &lt;code&gt;!help&lt;/code&gt; command can be used by the user to get the list of all the commands that our bots supports and a small description of each command. This is pretty similar to our ping command. All we need to do is to check if the message starts with &lt;code&gt;!help&lt;/code&gt; and reply accordingly.&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="c1"&gt;// Reply to !help&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;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;!help&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;return&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="s2"&gt;`I support 4 commands:\n
      !ping - To check if I am working\n
      !price &amp;lt;coin_name&amp;gt; &amp;lt;compare_currency&amp;gt; - To get the price of a coin with respect to another coin or currency\n
      !news - To get the latest news article related to crypto\n
      !help - For checking out what commands are available`&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;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgur.com%2FNxoZpVi.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%2Fimgur.com%2FNxoZpVi.png" alt="Help demo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That is pretty much it. We've built all the features that we desired. You can surely add more features to the bot as per your liking. I would highly encourage you to check out the &lt;a href="https://discord.js.org/" rel="noopener noreferrer"&gt;DiscordJS Documentation&lt;/a&gt; to explore more features. What we've built is just scratching the surface of the huge pile of features it provides up.&lt;/p&gt;

&lt;p&gt;Nevertheless, I'm sure you've learned something of value and I'm excited to see what you come up with. I hope this was a good introduction to &lt;code&gt;discord.js&lt;/code&gt; and I'll be happy to answer all your queries. Here's the &lt;a href="https://github.com/itsnitinr/crypto-discord-bot/commit/66c9f05294d847d14b710f81cf68b5b04e0a7a6e" rel="noopener noreferrer"&gt;final commit&lt;/a&gt; of the complete project.&lt;/p&gt;




&lt;h2&gt;
  
  
  Resources To Check Out
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://discord.js.org" rel="noopener noreferrer"&gt;Official DiscordJS Documentation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=BmKXBVdEV0g" rel="noopener noreferrer"&gt;Create a Discord Bot With Node.js on YouTube&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/playlist?list=PLaxxQQak6D_fxb9_-YsmRwxfw5PH9xALe" rel="noopener noreferrer"&gt;DiscordJS In Depth YouTube Playlist&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
    <item>
      <title>You Need to Try These 10 NPM Packages as a React Developer</title>
      <dc:creator>Nitin Ranganath</dc:creator>
      <pubDate>Fri, 26 Feb 2021 05:33:05 +0000</pubDate>
      <link>https://dev.to/itsnitinr/you-need-to-try-these-10-npm-packages-as-a-react-developer-3okg</link>
      <guid>https://dev.to/itsnitinr/you-need-to-try-these-10-npm-packages-as-a-react-developer-3okg</guid>
      <description>&lt;p&gt;As web developers, we tend to make use of several NPM packages on a daily basis for different reasons, from simple ones like adding colors to the &lt;code&gt;console.log()&lt;/code&gt; statements on our terminal to fully-fledged front-end libraries such as React. These packages increase our productivity and save us a lot of time by not having to rewrite things that have been implemented several times by tons of users. &lt;/p&gt;

&lt;p&gt;In this post, I'll introduce you to 10 NPM packages that you should check out if you're learning React or already are an experienced user. We'll be going over multiple domains such as UI frameworks to utility-based packages. Without further ado, let's get started.&lt;/p&gt;




&lt;h2&gt;
  
  
  Material UI
&lt;/h2&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%2Fimgur.com%2FCX3G0nA.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%2Fimgur.com%2FCX3G0nA.png" alt="Material UI"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://material-ui.com/" rel="noopener noreferrer"&gt;Material UI&lt;/a&gt; is probably one of the best UI frameworks built for React, allowing you to build a consistent design system while leveraging Google's Material Design. Material UI helps you in building and designing by providing over 50+ components such as cards, progress bars, modals, and a lot more, which you can further theme as per your requirements. If I had to recommend a UI framework to a React developer, Material UI would surely be my first choice.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/@material-ui/core" rel="noopener noreferrer"&gt;Link to NPM Package&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Redux Toolkit
&lt;/h2&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%2Fimgur.com%2FIcoYJoU.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%2Fimgur.com%2FIcoYJoU.png" alt="Redux Toolkit"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Although the &lt;code&gt;useContext&lt;/code&gt; and &lt;code&gt;useReducer&lt;/code&gt; hooks have reduced the need of using Redux in modern applications, it's not uncommon to see a lot of codebases still Redux for global state management. Redux is still a valuable skill to learn in my opinion and does have its own use cases. However, the amount of boilerplate it takes to set up Redux in your React application can be overwhelming, especially for beginners.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://redux-toolkit.js.org/" rel="noopener noreferrer"&gt;Redux Toolkit&lt;/a&gt; aims to solve just that! It is advertised as the official, opinionated, batteries-included toolset for efficient Redux development and is also highly recommended by the official Redux team to write your Redux logic. Do yourself and your codebase a favor by choosing Redux Toolkit over regular Redux next time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/@reduxjs/toolkit" rel="noopener noreferrer"&gt;Link to NPM Package&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  React Icons
&lt;/h2&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%2Fimgur.com%2FArZU8of.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%2Fimgur.com%2FArZU8of.png" alt="React Icons"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://react-icons.github.io/react-icons/" rel="noopener noreferrer"&gt;React Icons&lt;/a&gt; is a marvelous package that consolidates icons from over a dozen of popular icon sets such as Font Awesome, Material Icons, Ant Design Icons, and more. This makes it extremely easy to have access to all your favorite icons just by installing a single package without having to install each of them individually. Through ES6 imports, you can make sure that you import only those icons which you intend to use.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/react-icons" rel="noopener noreferrer"&gt;Link to NPM Package&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  React Google Login
&lt;/h2&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%2Fimgur.com%2FgWEg0b7.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%2Fimgur.com%2FgWEg0b7.png" alt="React Google Login"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OAuth or Open Authorization enables users to sign up or log in to your website through other providers such as Google, Facebook, Twitter, GitHub, and more. You must've noticed the 'Login with Google' button on lots of popular websites. &lt;a href="https://anthonyjgrove.github.io/react-google-login/" rel="noopener noreferrer"&gt;React Google Login&lt;/a&gt; allows you to accomplish the same functionality and makes the authorization process easy for you. All you need is an API key from Google and you're set to implement Google OAuth in your website using this simple package.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/react-google-login" rel="noopener noreferrer"&gt;Link to NPM Package&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Formik
&lt;/h2&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%2Fimgur.com%2FjbXAB0o.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%2Fimgur.com%2FjbXAB0o.png" alt="Formik"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://formik.org/" rel="noopener noreferrer"&gt;Formik&lt;/a&gt; makes the painstaking job of building forms in React easier by taking care of all the repetitive stuff such as keeping track of value state, change handlers, submit handlers, validation, and more. This form library is small, simple and encourages you to spend less time writing form code and focus on building your big thing. It is well documented and has a dedicated tutorial for you to get familiar with it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/formik" rel="noopener noreferrer"&gt;Link to NPM Package&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  React Query
&lt;/h2&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%2Fimgur.com%2FoXQ82Ic.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%2Fimgur.com%2FoXQ82Ic.png" alt="React Query"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An essential part of a full-stack web application is fetching the data from your backend API or server state and loading them into your component or global state. If you're using Redux, this process might be firing an action in your &lt;code&gt;useEffect&lt;/code&gt; hook to fetch data from your backend when the component is mounted. Well, what if there could be a better alternative to this approach?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://react-query.tanstack.com/" rel="noopener noreferrer"&gt;React Query&lt;/a&gt; is an excellent data-fetching library that is the perfect candidate for this use case. Not only fetching, but React Query is also capable of caching, synchronizing, updating server state, paginating, and even lazy loading. Everything you need to make your interactions with the backend more fruitful is baked into this library and I highly encourage you to give it a try. Alongside performance improvements, it will help you make your codebase cleaner and more maintainable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/react-query" rel="noopener noreferrer"&gt;Link to NPM Package&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Styled Components
&lt;/h2&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%2Fimgur.com%2FmQx4kBV.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%2Fimgur.com%2FmQx4kBV.png" alt="Styled Components"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://styled-components.com/" rel="noopener noreferrer"&gt;Styled Components&lt;/a&gt; is a CSS-in-JS library which JavaScipt's &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals" rel="noopener noreferrer"&gt;tagged template literals&lt;/a&gt; to create styled HTML components. Why should you consider this over the regular CSS approach? Good question! Styled Components provides a component-like structure to your custom styled elements and saves you from typing &lt;code&gt;className&lt;/code&gt; a bunch of times. Furthermore, it has some valuable features like automatic vendor prefixing and automatic critical CSS. Since Styled Components use the regular CSS syntax, you can transition pretty quickly to it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/styled-components" rel="noopener noreferrer"&gt;Link to NPM Package&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Axios
&lt;/h2&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%2Fimgur.com%2FwpnP302.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%2Fimgur.com%2FwpnP302.png" alt="Axios"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/axios/axios" rel="noopener noreferrer"&gt;Axios&lt;/a&gt; is a promise-based HTTP client based on the &lt;code&gt;XMLHttpRequest&lt;/code&gt; interface which helps you make HTTP requests in order to fetch some data. But wait, isn't that what the native &lt;code&gt;fetch()&lt;/code&gt; is used for. Well, yes. Just like other packages, the goal of this package is the simplify the process and provide more features such as automatic JSON data transformation, intercept request and response data, protect against XSRF, cancel requests and provide you a simpler API to work with for making HTTP requests. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/axios" rel="noopener noreferrer"&gt;Link to NPM Package&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Framer Motion
&lt;/h2&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%2Fimgur.com%2FdZwFPXJ.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%2Fimgur.com%2FdZwFPXJ.png" alt="Framer Motion"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.framer.com/motion/" rel="noopener noreferrer"&gt;Framer Motion&lt;/a&gt; is an amazing animation and motion library for React to make your websites more interactive and fun to look at. Just visit their landing page, and you'll be blown off by the sheer ease to use and the number of features they provide ranging from general animations, gesture-based animations, drag animations, scroll animations and so much more.  Let me put it this way: if you were on the lookout for animation libraries, look no further than Framer Motion.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://npmjs.com/package/framer-motion" rel="noopener noreferrer"&gt;Link to NPM Package&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Reselect
&lt;/h2&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%2Fimgur.com%2FIcoYJoU.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%2Fimgur.com%2FIcoYJoU.png" alt="Reselect"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This particular package is especially useful if you're Redux and are trying to improve the performance by avoiding unwanted expensive calculations. In a nutshell, &lt;a href="https://github.com/reduxjs/reselect" rel="noopener noreferrer"&gt;Reselect&lt;/a&gt; is a selector library that allows you to efficiently compute derived data from the Redux store through &lt;a href="https://en.wikipedia.org/wiki/Memoization" rel="noopener noreferrer"&gt;memoization&lt;/a&gt; and by memoized selectors. If performance is key to your React-Redux application, definitely check out Reselect.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/reselect" rel="noopener noreferrer"&gt;Link to NPM Package&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;So that was my list of 10 NPM packages that I think you should have a look at if you're working with React. Let me what packages do you use to make your workflow simpler and more productive, I'd love to hear them. Until then, happy coding!&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Build a Dogecoin Price Ticker using React</title>
      <dc:creator>Nitin Ranganath</dc:creator>
      <pubDate>Sun, 07 Feb 2021 17:49:25 +0000</pubDate>
      <link>https://dev.to/itsnitinr/build-a-dogecoin-price-ticker-using-react-54o0</link>
      <guid>https://dev.to/itsnitinr/build-a-dogecoin-price-ticker-using-react-54o0</guid>
      <description>&lt;p&gt;Projects. We all love them. Especially the ones that really help us to nail down the fundamentals and learn something new. Dogecoin has been trending since the past week so why don't we build something related to it. &lt;/p&gt;

&lt;p&gt;In this project, we will be building a simple Dogecoin price ticker, a web app which will fetch the lowest price of the day, the highest price of the day and the last traded price via an API and will be updated every 10 seconds. Throughout the project, you will learn about setting up a React project, building components, props, state and the most used React hooks such as &lt;code&gt;useState&lt;/code&gt; and &lt;code&gt;useEffect&lt;/code&gt;.&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%2Fimgur.com%2F7KYp1to.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%2Fimgur.com%2F7KYp1to.png" alt="Dogecoin Price Ticker Demo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I've broken down the project into small sections and if you face any issues in following along, you can check the GitHub repo commits to look at the changes I've made.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Live Demo:&lt;/strong&gt; &lt;a href="https://dogecoin-ticker.netlify.app/" rel="noopener noreferrer"&gt;https://dogecoin-ticker.netlify.app/&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Source Code:&lt;/strong&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://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/itsnitinr" rel="noopener noreferrer"&gt;
        itsnitinr
      &lt;/a&gt; / &lt;a href="https://github.com/itsnitinr/dogecoin-ticker" rel="noopener noreferrer"&gt;
        dogecoin-ticker
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A live Dogecoin price ticker built using React
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Creating a React Project
&lt;/h2&gt;

&lt;p&gt;The first step is to create ourselves a React project. For this purpose, we'll be using &lt;a href="https://create-react-app.dev/" rel="noopener noreferrer"&gt;Create React App&lt;/a&gt; which will help us to focus on our code and not worry about setting up the build tools. The prerequisites are that you'll need NodeJS v8.10 or above and NPM version v5.6 or above.&lt;/p&gt;

&lt;p&gt;Open up your terminal and run the following command in your preferred directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app dogecoin-ticker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;npx&lt;/code&gt; is a package runner tool that comes with npm. The above command might take 5-10 minutes to complete so grab a cup of coffee and relax!&lt;/p&gt;

&lt;p&gt;Once done, let's hop on to the project directory. For that, you could either use the file explorer or use the following terminal command: &lt;code&gt;cd dogecoin-ticker&lt;/code&gt;. Now, open up the project folder using your favourite text editor and we'll get started with the initial setup in the next section. To start the development server, run &lt;code&gt;npm start&lt;/code&gt; on your terminal in the project folder.&lt;/p&gt;

&lt;p&gt;If you got stuck in any of the steps, check &lt;a href="https://github.com/itsnitinr/dogecoin-ticker/commit/b518292156a8d0cba699c7f495800bf4474c0bbf" rel="noopener noreferrer"&gt;this commit&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Initial Setup
&lt;/h2&gt;

&lt;p&gt;Once we start our development server using &lt;code&gt;npm start&lt;/code&gt;, go to &lt;code&gt;localhost:3000&lt;/code&gt; on your browser and you'll be greeted with a screen like this.&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%2Fassets.digitalocean.com%2Farticles%2F66983%2FReact_Dark_BG.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%2Fassets.digitalocean.com%2Farticles%2F66983%2FReact_Dark_BG.png" alt="CRA Demo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the default homepage that Create React App has generated for us. Since we don't need anything similar to this, let's start by deleting unwanted files and setting up the project as per our requirements.&lt;/p&gt;

&lt;p&gt;The folder structure at this moment looks something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dogecoin-ticker
- public
    - index.html
    - favicon.ico
    - logo192.png
    - logo512.png
    - manifest.json
    - robots.txt
- src
    - App.css
    - App.js
    - App.test.js
    - index.css
    - index.js
    - logo.svg
    - reportWebVitals.js
    - setupTests.js
- node_modules
- .gitignore
- package.json 
- package-lock.json (or yarn.lock if using yarn)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The public folder consists consists of our &lt;code&gt;index.html&lt;/code&gt; file which will be rendered by our browser. Open it up and start by removing the unwanted comments and modifying the title of the webpage. You can also additionally edit the meta tag for description and add your own. Here's how your &lt;code&gt;index.html&lt;/code&gt; should look like once you're done:&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;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"%PUBLIC_URL%/favicon.ico"&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"&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;"theme-color"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"#000000"&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;"description"&lt;/span&gt;
      &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"Live dogecoin price ticker built using React"&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;"apple-touch-icon"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"%PUBLIC_URL%/logo192.png"&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;"manifest"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"%PUBLIC_URL%/manifest.json"&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;Dogecoin Ticker&lt;span class="nt"&gt;&amp;lt;/title&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&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;noscript&amp;gt;&lt;/span&gt;You need to enable JavaScript to run this app.&lt;span class="nt"&gt;&amp;lt;/noscript&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;"root"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&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;To give a more personal touch to our website, I have also changed the favicon and logo images which you can download from &lt;a href="https://gofile.io/d/LZIVD4" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's move on to the &lt;code&gt;src&lt;/code&gt; folder. We can get rid of most of the files here such as &lt;code&gt;App.test.js&lt;/code&gt;, &lt;code&gt;logo.svg&lt;/code&gt;, &lt;code&gt;reportWebVitals.js&lt;/code&gt; and &lt;code&gt;setupTests.js&lt;/code&gt;. On saving, you might have noticed that our development server throws an error that it failed to compile. Since we deleted the above files, we need to fix the imports as well. Checkout &lt;a href="https://github.com/itsnitinr/dogecoin-ticker/commit/7d3a7dc558217cea3b3ce58566543d97bd4c0669" rel="noopener noreferrer"&gt;this&lt;/a&gt; commit to see the additions and deletions in detail. Our final result will look like this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;App.js&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./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;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="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Dogecoin Ticker&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&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;We removed all the existing content generated by Create React App and replaced it with a &lt;code&gt;div&lt;/code&gt; containing an &lt;code&gt;h1&lt;/code&gt; with the text 'Dogecoin Ticker'. I've also changed the function to an arrow function but that's not mandatory. This function returns some JSX which is rendered by React. It can be used in multiple places in our project and is known as a component.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;index.js&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="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;ReactDOM&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-dom&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;./index.css&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;App&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;./App&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;ReactDOM&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;StrictMode&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;App&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;StrictMode&lt;/span&gt;&lt;span class="p"&gt;&amp;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;root&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we've removed the import for &lt;code&gt;reportWebVitals&lt;/code&gt; since we deleted it as it was not necessary. We import the React and ReactDOM libraries which allow us to render a React component onto the DOM. The React component that we're rendering here is the &lt;code&gt;App&lt;/code&gt; component from &lt;code&gt;App.js&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;App.css &amp;amp; index.css&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In these files, we just remove all the preexisting styles that were generated. Essentially, these are just empty CSS files for now but we'll add some custom styles soon.&lt;/p&gt;

&lt;p&gt;At the end of this section, our website looks something like this:&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%2Fimgur.com%2FeCZRzCA.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%2Fimgur.com%2FeCZRzCA.png" alt="Section 2 Demo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Making It Look Pretty
&lt;/h2&gt;

&lt;p&gt;Since we're just rendering a &lt;code&gt;div&lt;/code&gt; and an &lt;code&gt;h1&lt;/code&gt; currently through the &lt;code&gt;App&lt;/code&gt; component currently, our design looks plain. To spice it up, let's add a logo (which you can download from  &lt;a href="https://gofile.io/d/Ki7rFD" rel="noopener noreferrer"&gt;here&lt;/a&gt;) and some styles. Move the &lt;code&gt;logo.png&lt;/code&gt; to the &lt;code&gt;src&lt;/code&gt; folder once downloaded. &lt;/p&gt;

&lt;p&gt;Begin with importing our logo into our &lt;code&gt;App.js&lt;/code&gt; file like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;logo&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;./logo.png&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let's add more content to our &lt;code&gt;App&lt;/code&gt; component such as a title and a subtitle. You can use HTML elements like &lt;code&gt;h1&lt;/code&gt; and &lt;code&gt;h5&lt;/code&gt; for this purpose. To use our imported logo as the source for the &lt;code&gt;img&lt;/code&gt; tag, we use &lt;code&gt;{logo}&lt;/code&gt;. We can use simple JavaScript expressions and variables inside the &lt;code&gt;{}&lt;/code&gt; to render dynamic content. &lt;/p&gt;

&lt;p&gt;For the purpose of styling, we can add &lt;code&gt;classNames&lt;/code&gt; to the HTML entity. We do not use &lt;code&gt;class&lt;/code&gt; since it  can be misinterpreted as a JavaScript class (OOP concept). We can target these classes in our &lt;code&gt;App.css&lt;/code&gt; file to style them. Here's how my &lt;code&gt;App.js&lt;/code&gt; and &lt;code&gt;App.css&lt;/code&gt; files look like:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;App.js&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;logo&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;./logo.png&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;./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;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="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"App"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;logo&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Dogecoin Logo"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Live Dogecoin Price&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h5&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"subtitle"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Dogecoin To The Moon 🚀🌕&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h5&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&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;&lt;strong&gt;App.css&lt;/strong&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="nc"&gt;.App&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fff3b2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url("data:image/svg+xml,%3Csvg width='180' height='180' viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M81.28 88H68.413l19.298 19.298L81.28 88zm2.107 0h13.226L90 107.838 83.387 88zm15.334 0h12.866l-19.298 19.298L98.72 88zm-32.927-2.207L73.586 78h32.827l.5.5 7.294 7.293L115.414 87l-24.707 24.707-.707.707L64.586 87l1.207-1.207zm2.62.207L74 80.414 79.586 86H68.414zm16 0L90 80.414 95.586 86H84.414zm16 0L106 80.414 111.586 86h-11.172zm-8-6h11.173L98 85.586 92.414 80zM82 85.586L87.586 80H76.414L82 85.586zM17.414 0L.707 16.707 0 17.414V0h17.414zM4.28 0L0 12.838V0h4.28zm10.306 0L2.288 12.298 6.388 0h8.198zM180 17.414L162.586 0H180v17.414zM165.414 0l12.298 12.298L173.612 0h-8.198zM180 12.838L175.72 0H180v12.838zM0 163h16.413l.5.5 7.294 7.293L25.414 172l-8 8H0v-17zm0 10h6.613l-2.334 7H0v-7zm14.586 7l7-7H8.72l-2.333 7h8.2zM0 165.414L5.586 171H0v-5.586zM10.414 171L16 165.414 21.586 171H10.414zm-8-6h11.172L8 170.586 2.414 165zM180 163h-16.413l-7.794 7.793-1.207 1.207 8 8H180v-17zm-14.586 17l-7-7h12.865l2.333 7h-8.2zM180 173h-6.613l2.334 7H180v-7zm-21.586-2l5.586-5.586 5.586 5.586h-11.172zM180 165.414L174.414 171H180v-5.586zm-8 5.172l5.586-5.586h-11.172l5.586 5.586zM152.933 25.653l1.414 1.414-33.94 33.942-1.416-1.416 33.943-33.94zm1.414 127.28l-1.414 1.414-33.942-33.94 1.416-1.416 33.94 33.943zm-127.28 1.414l-1.414-1.414 33.94-33.942 1.416 1.416-33.943 33.94zm-1.414-127.28l1.414-1.414 33.942 33.94-1.416 1.416-33.94-33.943zM0 85c2.21 0 4 1.79 4 4s-1.79 4-4 4v-8zm180 0c-2.21 0-4 1.79-4 4s1.79 4 4 4v-8zM94 0c0 2.21-1.79 4-4 4s-4-1.79-4-4h8zm0 180c0-2.21-1.79-4-4-4s-4 1.79-4 4h8z' fill='%23676659' fill-opacity='0.13' fill-rule='evenodd'/%3E%3C/svg%3E")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100vh&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="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;column&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="nb"&gt;center&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="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.title&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#222831&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.subtitle&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#393e46&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;For styling, I kept the minimum height as 100vh so that the whole screen is utilised. On top of that, I've added a pale yellow color as background. The background-image property generates a diamond shaped pattern whose code I got from &lt;a href="https://www.heropatterns.com/" rel="noopener noreferrer"&gt;https://www.heropatterns.com/&lt;/a&gt;. Lastly, I've gave the &lt;code&gt;div&lt;/code&gt; the display property of flex and aligned the content to be horizontally and vertically centered. Feel free to copy paste the CSS code.&lt;/p&gt;

&lt;p&gt;I also imported the Raleway font from Google Fonts and applied some basic style reset to the &lt;code&gt;index.css&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;index.css&lt;/strong&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;@import&lt;/span&gt; &lt;span class="sx"&gt;url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;700&amp;amp;display=swap')&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="o"&gt;*,&lt;/span&gt;
&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nd"&gt;::before&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nd"&gt;::after&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&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;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;box-sizing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;border-box&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Raleway&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&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;Here's how our website looks like now:&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%2Fimgur.com%2FB6n4qvu.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%2Fimgur.com%2FB6n4qvu.png" alt="Post Design Demo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We're getting there! If you found any difficulty, refer &lt;a href="https://github.com/itsnitinr/dogecoin-ticker/commit/ce3ac5cbfa77587b8c84ad896c5e05a4a20e35dd" rel="noopener noreferrer"&gt;this commit&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building Price Card Component
&lt;/h2&gt;

&lt;p&gt;To display the prices of Dogecoin, you might have noticed that I've used a card-like component. This is a custom React component and in this section, we'll be building just that. Components are highly useful when we want the same layout but with with different content. Instead of writing the HTML code for each card, I can build a component which can take the price as a prop and render the content dynamically. Time to show it in action.&lt;/p&gt;

&lt;p&gt;While component file can be created in the &lt;code&gt;src&lt;/code&gt; folder itself, it is common practice to create a new folder inside &lt;code&gt;src&lt;/code&gt; called &lt;code&gt;components&lt;/code&gt; so that all our React components are at the same place and our &lt;code&gt;src&lt;/code&gt; folder doesn't become too crowded. So, create a &lt;code&gt;components&lt;/code&gt; folder inside the &lt;code&gt;src&lt;/code&gt; folder. Inside the newly created &lt;code&gt;components&lt;/code&gt; folder, let's create a new file called &lt;code&gt;PriceCard.jsx&lt;/code&gt; for our custom component.&lt;/p&gt;

&lt;p&gt;We can use either &lt;code&gt;js&lt;/code&gt; or &lt;code&gt;jsx&lt;/code&gt; extension for components. Both would work perfectly fine and hence, I'm going to use the &lt;code&gt;.jsx&lt;/code&gt; extension this time. The price card component is just a styled &lt;code&gt;div&lt;/code&gt; which takes consists of the type of price (highest of the day, lowest of the day or last traded price) and the price itself as props. Since the price and price type will be different for each card, we can leverage props to make our price card dynamic.&lt;/p&gt;

&lt;p&gt;Here's how I did it:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PriceCard.jsx&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;PriceCard&lt;/span&gt; &lt;span class="o"&gt;=&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="nx"&gt;price&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;border&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;high&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;8px solid #f44336&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;low&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;8px solid #4caf50&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;current&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;8px solid #3f51b5&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;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"price-card"&lt;/span&gt; &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;borderBottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;border&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="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h4&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"price-type"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h4&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"price"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;$ &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&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;PriceCard&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Firstly, we destructure the &lt;code&gt;type&lt;/code&gt; and &lt;code&gt;price&lt;/code&gt; props which will be used to make the content of price card dynamic. For styling the bottom border dynamically (red border for highest of the day, green border for the lowest of the day and blue border for last traded price), I have a created an object with 3 keys: high, low and current. The &lt;code&gt;type&lt;/code&gt; prop will also be one of these values. By adding the &lt;code&gt;style&lt;/code&gt; attribute to the &lt;code&gt;div&lt;/code&gt;, the bottom border style has been made dynamic.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{{borderBottom: border[type]}}&lt;/code&gt; will evaluate to either &lt;code&gt;borderBottom: 8px solid #f44336&lt;/code&gt; , &lt;code&gt;borderBottom: 8px solid #4caf50&lt;/code&gt; or &lt;code&gt;borderBottom: 8px solid #3f51b5&lt;/code&gt;. Notice that we camel case instead of the usual kebab case. For outputting dynamic content in our JSX, we wrap it with &lt;code&gt;{}&lt;/code&gt; such as &lt;code&gt;{price}&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now that we have built and exported our custom &lt;code&gt;PriceCard&lt;/code&gt; component, let's import it into our &lt;code&gt;App&lt;/code&gt; component and use it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;App.js&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;PriceCard&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/PriceCard&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;logo&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;./logo.png&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;./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;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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;img&lt;/span&gt; &lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;logo&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;alt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Dogecoin Logo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Live Dogecoin Price&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h5&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"subtitle"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Dogecoin To The Moon 🚀🌕&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h5&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"prices-container"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;PriceCard&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"low"&lt;/span&gt; &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;PriceCard&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"high"&lt;/span&gt; &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;PriceCard&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"current"&lt;/span&gt; &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="na"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  );
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since we don't have the prices retrieved from the API yet, I have set some random price to the price attribute. I've also wrapped all the &lt;code&gt;PriceCard&lt;/code&gt; components in a &lt;code&gt;div&lt;/code&gt; which we'll be using for styling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Append the following styles to App.css:&lt;/strong&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="nc"&gt;.prices-container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1200px&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;3rem&lt;/span&gt; &lt;span class="m"&gt;0&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="n"&gt;flex&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-evenly&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="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.price-card&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fbf6f0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&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;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&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;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.price-type&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;text-transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;uppercase&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;letter-spacing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#393e46&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.price&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#222831&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3rem&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;Once you have completed the above steps, you will be able to see something like:&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%2Fimgur.com%2FdHeuJp0.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%2Fimgur.com%2FdHeuJp0.png" alt="Price Card Demo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's the &lt;a href="https://github.com/itsnitinr/dogecoin-ticker/commit/9541ab763464d02109185cf5923775d008ccc3c9" rel="noopener noreferrer"&gt;commit for above changes&lt;/a&gt; in case you faced any issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Dogecoin Price From API
&lt;/h2&gt;

&lt;p&gt;Onto the final part of this project, which is to fetch the highest price of the day, lowest price of the day and last traded price from an API. This is also a great time to introduce you to React Hooks. We'll be using the &lt;code&gt;useState&lt;/code&gt; and &lt;code&gt;useEffect&lt;/code&gt; hook in this section. &lt;/p&gt;

&lt;p&gt;The API that we'll be using is the &lt;a href="https://github.com/WazirX/wazirx-api" rel="noopener noreferrer"&gt;WazirX API&lt;/a&gt;, which is a free API that allows us to get the price of lots of cryptocurrencies. The endpoint for fetching the price of Dogecoin compared to US Dollar is &lt;a href="https://api.wazirx.com/api/v2/tickers/dogeusdt" rel="noopener noreferrer"&gt;https://api.wazirx.com/api/v2/tickers/dogeusdt&lt;/a&gt;. This returns a JSON with all the data we need. However, to avoid issues due to CORS, use this endpoint: &lt;a href="https://nitinr-cors.herokuapp.com/https://api.wazirx.com/api/v2/tickers/dogeusdt" rel="noopener noreferrer"&gt;https://nitinr-cors.herokuapp.com/https://api.wazirx.com/api/v2/tickers/dogeusdt&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The response from looks like this:&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="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"at"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1612629617&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"ticker"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"buy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0.05"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"sell"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0.05001"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"low"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0.0447283"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"high"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0.0517549"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"last"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0.05"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"vol"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"19364432.0"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also, we will be using &lt;code&gt;axios&lt;/code&gt; to make a GET request to the above endpoint. We need to install &lt;code&gt;axios&lt;/code&gt; before we can begin to use it. So, stop the React development server by pressing Ctrl + C. Now type &lt;code&gt;npm install axios&lt;/code&gt; and run the command. Once done, start the server back using &lt;code&gt;npm start&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;Since the price of Dogecoin is subject to change every time we make an API call, we can keep it in the state using the &lt;code&gt;useState&lt;/code&gt; hook. Whenever the API is called, we can set the state to the newly fetched data so that our application can re-render accordingly. &lt;/p&gt;

&lt;p&gt;Using the &lt;code&gt;useEffect&lt;/code&gt; hook, we can make a call to our API as soon as our component is mounted. With the help of &lt;code&gt;setInterval&lt;/code&gt; function, we can call a function, which in turn calls our API every 10 seconds. Here's the complete &lt;code&gt;App.js&lt;/code&gt; component followed by the explanation:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;App.js:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;axios&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="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useEffect&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;PriceCard&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/PriceCard&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;logo&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;./logo.png&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;./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;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;ticker&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setTicker&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="na"&gt;low&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;high&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;last&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="nf"&gt;useEffect&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;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getDogecoinPrice&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://nitinr-cors.herokuapp.com/https://api.wazirx.com/api/v2/tickers/dogeusdt&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
      &lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nf"&gt;setTicker&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ticker&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nf"&gt;getDogecoinPrice&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;interval&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;setInterval&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;getDogecoinPrice&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;10000&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;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;clearInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;interval&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;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"App"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;logo&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Dogecoin Logo"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Live Dogecoin Price&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h5&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"subtitle"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Dogecoin To The Moon 🚀🌕&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h5&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"prices-container"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;PriceCard&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"low"&lt;/span&gt; &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;ticker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;low&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;PriceCard&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"high"&lt;/span&gt; &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;ticker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;high&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;PriceCard&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"current"&lt;/span&gt; &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;ticker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;last&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        Dogecoin price updated every 10 seconds seconds from&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt; &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://wazirx.com/"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;WazirX API&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;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;We import the &lt;code&gt;useState&lt;/code&gt; and &lt;code&gt;useEffect&lt;/code&gt; hooks from &lt;code&gt;react&lt;/code&gt; library as named exports and &lt;code&gt;axios&lt;/code&gt; from the &lt;code&gt;axios&lt;/code&gt; package as a default export. The &lt;code&gt;useState&lt;/code&gt; hooks takes in the initial value which we have set to an object having values of 0 for high, low and last. It returns us a variable which holds the current state and a function to set the new state. In our case, these are the &lt;code&gt;ticker&lt;/code&gt; and &lt;code&gt;setTicker&lt;/code&gt; respectively.&lt;/p&gt;

&lt;p&gt;Inside the &lt;code&gt;useEffect&lt;/code&gt; hook, we define an asynchronous function (since API calls are asynchronous in nature) named as &lt;code&gt;getDogecoinPrice&lt;/code&gt; in which we make a request to our API endpoint using &lt;code&gt;axios&lt;/code&gt;. We destructure the data from the response and set the state of ticker to &lt;code&gt;data.ticker&lt;/code&gt; since we need only the ticker data from response. After the function definition, we call this function once followed by a &lt;code&gt;setInterval&lt;/code&gt; with a delay of 10000ms (10 seconds) which will run our function and call our API every 10 seconds to get the updated price.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;useEffect&lt;/code&gt; hooks also take an array of dependencies as a second argument but since we need to run the &lt;code&gt;setInterval&lt;/code&gt; only once, when the component is mounted, we can keep it as an empty array.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;price&lt;/code&gt; attribute of &lt;code&gt;PriceCard&lt;/code&gt; component can be set to &lt;code&gt;ticker.low&lt;/code&gt;, &lt;code&gt;ticker.high&lt;/code&gt; and &lt;code&gt;ticker.last&lt;/code&gt; respectively to get the lowest, highest and last traded value. Since &lt;code&gt;ticker&lt;/code&gt; is a state variable, React will automatically re-render the UI every time its value changes. &lt;/p&gt;

&lt;p&gt;Finally, here's what we have built:&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%2Fimgur.com%2FINVQRd2.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%2Fimgur.com%2FINVQRd2.png" alt="Final Output"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Congratulations! You have built yourself a nice and simple web application using React to stay updated with Dogecoin. If you faced any difficulties during building it, please have a look at the GitHub repo or post a comment down below and I'll be more than happy to help you out. That's all, folks!  &lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>javascript</category>
    </item>
    <item>
      <title>5 Awesome Web Browsers For Developers</title>
      <dc:creator>Nitin Ranganath</dc:creator>
      <pubDate>Tue, 02 Feb 2021 08:16:24 +0000</pubDate>
      <link>https://dev.to/itsnitinr/5-awesome-web-browsers-for-developers-221</link>
      <guid>https://dev.to/itsnitinr/5-awesome-web-browsers-for-developers-221</guid>
      <description>&lt;p&gt;If there's a software that developers use more than text editors or IDE, it has to be web browsers, right? From your occasional Google searches to fix that pesky little bug in your code to browsing memes on Reddit, it all starts with firing up your web browsers. However, not all browsers are the same.&lt;/p&gt;

&lt;p&gt;As a web developer, you need a browser that makes you more productive by providing tools for analyzing and debugging code. And that's what this post is going to cover. Whether you're a casual user or a hardcore frontend developer, there is something for everyone. Let's get right into it!&lt;/p&gt;

&lt;h3&gt;
  
  
  Table of Contents
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Firefox Developer Edition&lt;/li&gt;
&lt;li&gt;Sizzy&lt;/li&gt;
&lt;li&gt;Polypane&lt;/li&gt;
&lt;li&gt;Brave&lt;/li&gt;
&lt;li&gt;Google Chrome&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Firefox Developer Edition &lt;a&gt;&lt;/a&gt;
&lt;/h2&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%2Fwww.mozilla.org%2Fmedia%2Fimg%2Ffirefox%2Fdeveloper%2Fhero-screenshot.baf6dd693658.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%2Fwww.mozilla.org%2Fmedia%2Fimg%2Ffirefox%2Fdeveloper%2Fhero-screenshot.baf6dd693658.png" alt="FDE Image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Firefox, one of the most popular web browsers out there, has a special edition of its browser that is crafted for developers like you and me. We're talking about &lt;a href="https://www.mozilla.org/en-US/firefox/developer/" rel="noopener noreferrer"&gt;Firefox Developer Edition&lt;/a&gt;. The first question that would arise in our mind would be what makes the developer edition, you know, the developer edition. Here's a list of some features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lots of experimental features that aren't found in mainstream browsers.&lt;/li&gt;
&lt;li&gt;Identify inactive CSS on a webpage.&lt;/li&gt;
&lt;li&gt;Awesome DevTools to debug and inspect your code.&lt;/li&gt;
&lt;li&gt;Make CSS grids easier to work with using visualization.&lt;/li&gt;
&lt;li&gt;Get information on the fonts used on a webpage.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What's special?&lt;/strong&gt; Firefox is undoubtedly one of the best and popular browsers. They are privacy-oriented and fast. The fact that they have an official developer edition makes it even better.&lt;/p&gt;

&lt;p&gt;Sounds incredible, right? You can read more about the features mentioned above on their official website. Firefox Developer Edition is available for Windows, Linux, and macOS for free, so nothing stops you from trying it out.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sizzy &lt;a&gt;&lt;/a&gt;
&lt;/h2&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%2Fi.imgur.com%2F1D6nhPI.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%2Fi.imgur.com%2F1D6nhPI.png" alt="Sizzy Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://sizzy.co/" rel="noopener noreferrer"&gt;Sizzy&lt;/a&gt; is a browser that focuses on speeding up your development workflow by providing excellent features and plugins. It is incredibly feature-rich and does stand up to its promise of making you more productive and speed up your development workflow. The list of features that Sizzy offers is quite long, but here are some that I felt were noteworthy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simulate and screenshot your webpage on multiples devices at the same time.&lt;/li&gt;
&lt;li&gt;Inspect an element on all devices using the Universal Inspect Element feature.&lt;/li&gt;
&lt;li&gt;Check how your website reacts and performs under various network conditions.&lt;/li&gt;
&lt;li&gt;Spotlight-like feature to access everything with just your keyboard.&lt;/li&gt;
&lt;li&gt;Session manager to switch between users with any manual work.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What's special?&lt;/strong&gt; If you were looking for a feature-rich browser with tools that you won't find in any other browsers, Sizzy comes pretty close to it. It really is a browser made for developers.&lt;/p&gt;

&lt;p&gt;There is just one caveat, though. Sizzy is not a free browser. It works on a monthly or annual subscription model, but they are generous enough to give you a 14-day free trial to try it out. Sizzy is available on Windows, Linux, and macOS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Polypane &lt;a&gt;&lt;/a&gt;
&lt;/h2&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%2Fpolypane.app%2Fstatic%2F67516ed9f9812448e4fd4cd42b113276%2F4e530%2Foverview-split.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%2Fpolypane.app%2Fstatic%2F67516ed9f9812448e4fd4cd42b113276%2F4e530%2Foverview-split.png" alt="Polypane Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you felt that Sizzy seemed a bit overwhelming for you, &lt;a href="https://polypane.app/" rel="noopener noreferrer"&gt;Polypane&lt;/a&gt; aims to strike the perfect balance between your classic browser and a developer-oriented one. However, this does not mean that Polypane lacks useful features. It keeps the important ones from Sizzy while excluding the not-so-useful ones. Here's what Polypane offers you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simulate your website on multiple viewports, from mobile to 5K screens.&lt;/li&gt;
&lt;li&gt;Eighty accessibility tests to make your website a pleasant experience for everyone.&lt;/li&gt;
&lt;li&gt;Social media previews supporting numerous platforms.&lt;/li&gt;
&lt;li&gt;It comes with live and hot reloading by default, from plain HTML to React apps.&lt;/li&gt;
&lt;li&gt;Supports extensions for all your favorite frameworks: React, Angular, Vue, Svelte, and much more.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What's Special?&lt;/strong&gt; Polypane pays particular emphasis on making your website accessible. This is evident as it comes with features like color blindness simulators, which you won't find on your mainstream browsers.&lt;/p&gt;

&lt;p&gt;Like Sizzy, Polypane works on a subscription-based payment model as well. But the good thing is, they, too, provide you a free 14-day trial with no credit card details required to get started. Go and check out this fantastic browser on Windows, Linux, and macOS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Brave &lt;a&gt;&lt;/a&gt;
&lt;/h2&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%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F8%2F83%2FBrave_Browser_Welcome_Page.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%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F8%2F83%2FBrave_Browser_Welcome_Page.png" alt="Brave Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The browsers mentioned above are explicitly geared towards developers. If you're looking for something more casual and for daily use, &lt;a href="https://brave.com/" rel="noopener noreferrer"&gt;Brave Browser&lt;/a&gt; is a great choice! Brave is a fast, secure, and privacy-oriented web browser co-founded by Brendan Eich, the guy who created JavaScript and co-founded Mozilla. So yeah, you're in pretty good hands. Here's why I prefer Brave Browser:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Brave Browser claims to around 3x faster than Google Chrome while also optimized for better battery life and memory consumption.&lt;/li&gt;
&lt;li&gt;It comes with an inbuilt ad-blocker and security measure to make your browsing session secure.&lt;/li&gt;
&lt;li&gt;Syncs with your Android phone or iPhone seamlessly.&lt;/li&gt;
&lt;li&gt;IPFS integration to browse websites without intermediaries.&lt;/li&gt;
&lt;li&gt;Absolutely zero private data collection.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What's Special?&lt;/strong&gt; Brave rewards you for using it. Yes! By optionally turning on the Brave Rewards option, you get a small and discreet ad notification that you don't even have to click. With each notification, you receive BAT, a crypto token. You can use BATs to support the publishers you love for free through contributing your BAT.&lt;/p&gt;

&lt;p&gt;Brave is a reliable choice if you're looking for an excellent daily use browser. It's fast, it's secure, and just plain good. It is free, and you can use it on your computer (Windows, Linux, macOS) and your mobile devices (Android, iOS).&lt;/p&gt;

&lt;h2&gt;
  
  
  Google Chrome &lt;a&gt;&lt;/a&gt;
&lt;/h2&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%2Fwww.google.com%2Fchrome%2Fstatic%2Fimages%2Fhomepage%2Fhomepage_tools.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%2Fwww.google.com%2Fchrome%2Fstatic%2Fimages%2Fhomepage%2Fhomepage_tools.png" alt="Chrome Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I just had to include this one. &lt;a href="https://www.google.com/intl/en_in/chrome/" rel="noopener noreferrer"&gt;Google Chrome&lt;/a&gt; is THE most popular browser. In a &lt;a href="https://gs.statcounter.com/browser-market-share" rel="noopener noreferrer"&gt;survey conducted by statcounter in December 2020&lt;/a&gt;, Google Chrome accounts for over 60% of users, miles ahead of its competition. As a developer, this also means that you should definitely test your code on Chrome before your ship it to production. So, why should you consider Chrome?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One of the best browsers in terms of feature compatibility.&lt;/li&gt;
&lt;li&gt;Highly popular with a large user base.&lt;/li&gt;
&lt;li&gt;Integration with the Google ecosystem.&lt;/li&gt;
&lt;li&gt;The industry standard with tons of extensions.&lt;/li&gt;
&lt;li&gt;A great DevTools.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What's Special?&lt;/strong&gt; To be honest, there's nothing fancy about Chrome, which is one reason why it's so popular. It's aimed towards everyone. Considering that a ton of people use it, you might as well keep it handy.&lt;/p&gt;

&lt;p&gt;You don't have to use Chrome. But it is undeniable that it will hold the majority of the market share for the next few years as well. Chrome isn't really privacy-oriented, but the Google ecosystem integration is pretty tempting. It's available for free on all the major platforms.&lt;/p&gt;




&lt;p&gt;So, that was my list of some of the browsers which I felt were awesome for developers. Do you agree? Or did I miss out on anything? Let me know your thoughts in the comments below.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>productivity</category>
      <category>discuss</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The Ultimate Guide to MERN Stack</title>
      <dc:creator>Nitin Ranganath</dc:creator>
      <pubDate>Fri, 15 Jan 2021 09:05:35 +0000</pubDate>
      <link>https://dev.to/itsnitinr/the-ultimate-guide-to-mern-stack-1051</link>
      <guid>https://dev.to/itsnitinr/the-ultimate-guide-to-mern-stack-1051</guid>
      <description>&lt;h2&gt;
  
  
  The Modern Web
&lt;/h2&gt;

&lt;p&gt;Websites have come a long way from what they used to be a decade ago. We started with plain HTML and CSS websites. Then came JavaScript and revolutionized the way the web works. From that point onward, web technologies have made significant strides, owing to JavaScript frameworks, which made single-page applications or SPAs a thing. Today, we're able to build websites that fetch the code files from the server once and never reload again, even while visiting other pages. How does this work?&lt;/p&gt;

&lt;p&gt;If you've ever wanted to become a full-stack web developer, the chances are that you came across the term &lt;strong&gt;MERN Stack&lt;/strong&gt;. Worry not if you haven't, though. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is it?&lt;/li&gt;
&lt;li&gt;what does it stand for&lt;/li&gt;
&lt;li&gt;How can you become a MERN stack developer? &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'm here to demystify it and introduce you to one of the trendiest web development tech stacks while providing you a proper roadmap as well as resources alongside.  Are you excited? Let's dive right into it and begin with understanding the core concepts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;What is the MERN Stack&lt;/li&gt;
&lt;li&gt;MongoDB&lt;/li&gt;
&lt;li&gt;ExpressJS&lt;/li&gt;
&lt;li&gt;ReactJS&lt;/li&gt;
&lt;li&gt;NodeJS&lt;/li&gt;
&lt;li&gt;Combining The Technologies &amp;amp; Exploring How It Works Together&lt;/li&gt;
&lt;li&gt;How To Become a MERN Stack Developer?&lt;/li&gt;
&lt;li&gt;Resources &amp;amp; Tools&lt;/li&gt;
&lt;li&gt;Let's Look at the Alternatives&lt;/li&gt;
&lt;li&gt;Final Words&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What is the MERN Stack &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;The MERN stack is a web development tech stack consisting of &lt;strong&gt;M&lt;/strong&gt;ongoDB, &lt;strong&gt;E&lt;/strong&gt;xpressJS, &lt;strong&gt;R&lt;/strong&gt;eactJS &lt;strong&gt;N&lt;/strong&gt;odeJS and enables you to build feature-rich single page web applications using a single programming language, JavaScript. Some developers consider this to one of the key reasons why the MERN stack is so popular. You can use your proficiency in a single language to manage both the front and back of your web application.&lt;/p&gt;

&lt;p&gt;Now that we have a basic understanding of the MERN stack let's dive deeper into the technologies it consists of, starting with MongoDB.&lt;/p&gt;




&lt;h2&gt;
  
  
  MongoDB &lt;a&gt;&lt;/a&gt;
&lt;/h2&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%2Fres.cloudinary.com%2Fdh8m4lgft%2Fimage%2Fupload%2Fv1610648991%2Fwebsite-images%2F4j6jlxy_dejjle.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%2Fres.cloudinary.com%2Fdh8m4lgft%2Fimage%2Fupload%2Fv1610648991%2Fwebsite-images%2F4j6jlxy_dejjle.png" alt="MongoDB Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.mongodb.com" rel="noopener noreferrer"&gt;MongoDB&lt;/a&gt; is a NoSQL database in which data is stored in documents that comprise key-value pairs, sharing a lot of resemblance to JSON or JavaScript Object Notation. Woah, Woah, too much jargon? Don't worry! Let's break the above sentence into smaller chunks. &lt;/p&gt;

&lt;p&gt;I am beginning with SQL vs. NoSQL. In SQL databases, data is stored in tables. Tables are just a collection of data in tabular form through rows and columns. Time for some visual representation!&lt;/p&gt;

&lt;p&gt;Here's how the data stored in MongoDB looks like:&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="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;ObjectId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;5fdf7cd797334f00175e956c&lt;/span&gt;&lt;span class="dl"&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Nitin Ranganath&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;nitinranganath@gmail.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;itsasecret!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="nx"&gt;createdAt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2020&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="nx"&gt;T16&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;33&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;27.667&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;00&lt;/span&gt;
    &lt;span class="nx"&gt;updatedAt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2021&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;01&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;01&lt;/span&gt;&lt;span class="nx"&gt;T08&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;06&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;15.269&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;00&lt;/span&gt;
    &lt;span class="nx"&gt;__v&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And here's out the data stored in MySQL, a SQL-based database looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;| id |    name    |            email            |  password   |
|  1 |    Nitin   |   nitinranganath@gmail.com  | itsasecret! |
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;MongoDB is excellent in so many aspects, making it a terrific choice for your upcoming projects. Some of these are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;High performance through indexing&lt;/li&gt;
&lt;li&gt;Dynamic schemas for models&lt;/li&gt;
&lt;li&gt;High scalability through distributing data on multiple servers&lt;/li&gt;
&lt;li&gt;Ability to store geospatial data through GeoJSON&lt;/li&gt;
&lt;li&gt;Auto replication&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And a lot more!&lt;/p&gt;

&lt;p&gt;Alright, but how exactly shall we use MongoDB to store our data in a  MERN stack web application? While we can use the &lt;code&gt;mongodb&lt;/code&gt; npm package, it is more convenient to use an ODM or Object Data Modelling library such as &lt;code&gt;mongoose&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;If I were to prepare a checklist of stuff you learn regarding MongoDB for building full stack web applications, it would consist of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Setting up local MongoDB or cloud MongoDB Atlas database&lt;/li&gt;
&lt;li&gt;Creating models and schemas&lt;/li&gt;
&lt;li&gt;Perform CRUD (Create, Read, Update &amp;amp; Delete) operations on the database&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bonus points for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Linking two related models using &lt;code&gt;ref&lt;/code&gt;s&lt;/li&gt;
&lt;li&gt;Understanding mongoose &lt;code&gt;pre&lt;/code&gt; and &lt;code&gt;post&lt;/code&gt; hooks&lt;/li&gt;
&lt;li&gt;Mongoose data validation&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ExpressJS &lt;a&gt;&lt;/a&gt;
&lt;/h2&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%2Fres.cloudinary.com%2Fdh8m4lgft%2Fimage%2Fupload%2Fv1610649005%2Fwebsite-images%2FsBx5Y16_fiv15j.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%2Fres.cloudinary.com%2Fdh8m4lgft%2Fimage%2Fupload%2Fv1610649005%2Fwebsite-images%2FsBx5Y16_fiv15j.png" alt="Express Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Moving on to &lt;a href="https://expressjs.com/" rel="noopener noreferrer"&gt;ExpressJS&lt;/a&gt;, let's first try to understand what it exactly is, why do we use it, and do we need it (spoiler alert, it's not!). Express is the most popular web application framework which uses NodeJS. In MERN stack applications, Express's role is to manage our backend API server, the one from which we will be fetching data from a database via our React frontend.&lt;/p&gt;

&lt;p&gt;Express is used to listen to a particular port of our server for requests from the user or frontend in simpler terms. We can create different routes for each endpoint which the user accesses. Here's an example to make it clear what I'm talking about:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET https://ourwebsite.com/products     -&amp;gt; Fetches all products
GET https://ourwebsite.com/products/1   -&amp;gt; Fetches the product with ID of 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As the programmer, we design and build the routes to get the appropriate data from the right endpoint. That's what Express allows us to do quickly. Remember when I said Express is not precisely required? That's because we can use the core &lt;code&gt;http&lt;/code&gt; module that NodeJS provides us to create the routes that I mentioned above. Then why don't we use that? Because Express makes the whole developer experience much better.&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="c1"&gt;// Using http&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;http&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;http&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;http&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createServer&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="k"&gt;if &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;url&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/products&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&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;method&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;GET&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;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeHead&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="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="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;end&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;products&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="nf"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5000&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Server running on port 5000&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

&lt;span class="c1"&gt;// Using express&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;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="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/&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;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="nx"&gt;res&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;products&lt;/span&gt;&lt;span class="p"&gt;);&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="mi"&gt;5000&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Server running on port 5000&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;p&gt;This was just an example, quite a simple one too. Express code is much more cleaner to read as well as write. Now, coming to things that you should learn concerning Express, as a MERN stack developer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Setting up an express server and listening on the desired port&lt;/li&gt;
&lt;li&gt;Create routes/endpoints for data CRUD operations through GET, POST, PUT, and DELETE&lt;/li&gt;
&lt;li&gt;Reading JSON form data sent from frontend via express.json() middleware&lt;/li&gt;
&lt;li&gt;Setting up an ODM like mongoose with Express&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bonus point for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Separating the logic in different files such as controllers, routes, and models&lt;/li&gt;
&lt;li&gt;Creating custom middlewares to handle errors and more&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ReactJS &lt;a&gt;&lt;/a&gt;
&lt;/h2&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%2Fres.cloudinary.com%2Fdh8m4lgft%2Fimage%2Fupload%2Fv1610649082%2Fwebsite-images%2Fhdvjf63_hpkxyl.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%2Fres.cloudinary.com%2Fdh8m4lgft%2Fimage%2Fupload%2Fv1610649082%2Fwebsite-images%2Fhdvjf63_hpkxyl.png" alt="ReactJS Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to become a frontend or a full stack web developer, the chances are that you've heard about JavaScript frameworks such as &lt;a href="https://reactjs.org/" rel="noopener noreferrer"&gt;React&lt;/a&gt;, &lt;a href="https://vuejs.org/" rel="noopener noreferrer"&gt;Vue&lt;/a&gt;, or &lt;a href="https://angular.io/" rel="noopener noreferrer"&gt;Angular&lt;/a&gt;. For now, let's focus on React: undeniably, the most popular JavaScript frontend library. We'll be having a brief look at Vue and Angular to discuss the MEVN and MEAN stack. But let's learn more about React for now.&lt;/p&gt;

&lt;p&gt;As mentioned above, it is a library created by Facebook that allows us to develop dynamic and interactive user interfaces on our websites efficiently. It offers dynamic interfaces using props (short for properties) and state in our web application. Moreover, it provides us with the ability to break down our code into smaller chunks, known as components, which make them more versatile. Components can be imported and used in multiple places in our web application, saving us time and energy to avoid rewriting the code with minor changes and keep our codebase DRY (don't repeat yourself.&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%2Fres.cloudinary.com%2Fdh8m4lgft%2Fimage%2Fupload%2Fv1610649091%2Fwebsite-images%2FNNa3Zdp_yuvrld.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%2Fres.cloudinary.com%2Fdh8m4lgft%2Fimage%2Fupload%2Fv1610649091%2Fwebsite-images%2FNNa3Zdp_yuvrld.png" alt="Components"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the best things about React is that you can use it to create single-page applications or SPAs for short. What's unique about SPAs is that we only have to load all our static assets like HTML, CSS, and JavaScript only once compared to traditional websites that reload and fetch new assets every time you visit a new page of a website. For routing, &lt;code&gt;react-router-dom&lt;/code&gt; is one of the most popular ways to do so. In a nutshell, load once and access the full website without ever reloading, unless you manually reload, duh!&lt;/p&gt;

&lt;p&gt;We can have a whole separate article to discuss React and what makes it so great. Since this is more of an overview of the MERN stack and not just React, I'll list down some of the features of React which you'll be using while developing web applications, and you should definitely learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creating appropriate components and using props &lt;/li&gt;
&lt;li&gt;Write functional React code&lt;/li&gt;
&lt;li&gt;Commonly used &lt;a href="https://thesmartcoder.dev/awesome-react-hooks/" rel="noopener noreferrer"&gt;React hooks&lt;/a&gt; such as &lt;code&gt;useState&lt;/code&gt; and &lt;code&gt;useEffect&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Managing props in a component through the &lt;code&gt;useState&lt;/code&gt; hook&lt;/li&gt;
&lt;li&gt;Conditional rendering&lt;/li&gt;
&lt;li&gt;Making API calls from the &lt;code&gt;useEffect&lt;/code&gt; hook to get data from the backend&lt;/li&gt;
&lt;li&gt;Making form inputs controlled and handling form submits&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Additionally, you sharpen your &lt;a href="https://thesmartcoder.dev/10-tips-and-tricks-that-will-make-you-a-better-reactjs-dev/" rel="noopener noreferrer"&gt;React skills&lt;/a&gt; with the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Managing  global state through Context API or Redux&lt;/li&gt;
&lt;li&gt;Learning the use cases of less common React hooks like &lt;code&gt;useRef&lt;/code&gt;, &lt;code&gt;useMemo&lt;/code&gt;, and more&lt;/li&gt;
&lt;li&gt;Using styled-components or other CSS in JS methods &lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  NodeJS &lt;a&gt;&lt;/a&gt;
&lt;/h2&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%2Fres.cloudinary.com%2Fdh8m4lgft%2Fimage%2Fupload%2Fv1610649102%2Fwebsite-images%2FySNPrgc_uaqeav.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%2Fres.cloudinary.com%2Fdh8m4lgft%2Fimage%2Fupload%2Fv1610649102%2Fwebsite-images%2FySNPrgc_uaqeav.png" alt="NodeJS Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, we complete the overview of the technologies that make up the MERN stack by exploring &lt;a href="https://nodejs.org/" rel="noopener noreferrer"&gt;NodeJS&lt;/a&gt;. First things first, what is NodeJS, and how is it different from JavaScript? Is it something different altogether; why do we use it in the first place; can't we use JavaScript instead? I'll try answering all these common questions in the upcoming paragraphs. But first, let's see what NodeJS is.&lt;/p&gt;

&lt;p&gt;NodeJS is a cross-platform JavaScript runtime environment that uses Google's V8 engine to run JavaScript code outside the browser. JavaScript intends to run on browsers, but we don't have browsers on our backend, do we? This is where NodeJS shines. It enables us to write JavaScript, which can run on our backend servers. But how does it achieve this? It uses something known as the V8 engine and libuv, a whole other topic.  Here's a visual representation of how the NodeJS architecture works in a nutshell:&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%2Fres.cloudinary.com%2Fdh8m4lgft%2Fimage%2Fupload%2Fv1610649111%2Fwebsite-images%2FQRePV_pafdq1.jpg" 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%2Fres.cloudinary.com%2Fdh8m4lgft%2Fimage%2Fupload%2Fv1610649111%2Fwebsite-images%2FQRePV_pafdq1.jpg" alt="NodeJS Architecture"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're interested in knowing more about the internal working of NodeJS, such as event loop and more, &lt;a href="https://www.youtube.com/watch?v=qG-PLm3APSs" rel="noopener noreferrer"&gt;here's&lt;/a&gt; an excellent video to get you started with.&lt;/p&gt;

&lt;p&gt;Coming back to the MERN stack, the purpose of NodeJS is simple. Allow us to write our backend in JavaScript, saving us the trouble of learning a new programming language capable of running the backend. It's an event-driven, non-blocking I/O model moreover. While there's not much specific to NodeJS that you have to learn to build a MERN stack application, here are some related things you should take a look at:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Initialising a npm package&lt;/li&gt;
&lt;li&gt;Installing npm packages through &lt;code&gt;npm&lt;/code&gt; or &lt;code&gt;yarn&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Importing and exports modules using commonJS &lt;/li&gt;
&lt;li&gt;Understanding the &lt;code&gt;package.json&lt;/code&gt; file&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bonus points for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Accessing the filesystem using inbuilt &lt;code&gt;fs&lt;/code&gt; package&lt;/li&gt;
&lt;li&gt;Setting up a server with an inbuilt &lt;code&gt;http&lt;/code&gt; package (not required if using express)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Combining The Technologies &amp;amp; Exploring How It Works Together &lt;a&gt;&lt;/a&gt;
&lt;/h2&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%2Fres.cloudinary.com%2Fdh8m4lgft%2Fimage%2Fupload%2Fv1610649121%2Fwebsite-images%2FiLcOFkj_ficp97.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%2Fres.cloudinary.com%2Fdh8m4lgft%2Fimage%2Fupload%2Fv1610649121%2Fwebsite-images%2FiLcOFkj_ficp97.png" alt="How It Works Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the previous section, we had a look at all the four technologies which constituted the MERN stack. While each one of them is fantastic to work with individually, combining these technologies working together like clockwork results in an excellent web application. That's what we're going to learn about in this section. Knowing each technology is half the skill, while the other half is to piece them together into something meaningful. What could be better than another visual representation of a MERN stack web application, where the user is interacting with the frontend, which in turn is accessing the backend and the database. &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%2Fres.cloudinary.com%2Fdh8m4lgft%2Fimage%2Fupload%2Fv1610649351%2Fwebsite-images%2FUowd7nz_dpyzws.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%2Fres.cloudinary.com%2Fdh8m4lgft%2Fimage%2Fupload%2Fv1610649351%2Fwebsite-images%2FUowd7nz_dpyzws.png" alt="Block Diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's understand the whole mechanism by taking an example. Assume that we have built a great e-commerce web application that sells apparel. We have a customer who is currently visiting our website to shop for some sneakers. We have a link on the landing page that takes the user to the sneakers page. So how do we get the data from the backend? Let's take it one step at a time.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;User visits our website's landing page built using React.&lt;/li&gt;
&lt;li&gt;User clicks on the link to shop for sneakers. We render the sneakers page without reloading the page since we have built a single page application.&lt;/li&gt;
&lt;li&gt;We do not have the sneakers data at this point, i.e., the state is empty. Therefore, we make an API call to our backend to fetch the data.&lt;/li&gt;
&lt;li&gt;Since the process of fetching the data from our database is asynchronous, meaning that it will take some amount of time for it to finish executing, we show the user a loading GIF while sneakers data is being retrieved.&lt;/li&gt;
&lt;li&gt;In our backend, ExpressJS looks at the endpoint (route) we've hit and executed the appropriate controller function, which is used to retrieve sneakers data. &lt;/li&gt;
&lt;li&gt;Inside this controller function, we use &lt;code&gt;mongoose&lt;/code&gt; to query our database and get the data and return it in the form of JSON (JavaScript Object Notation).&lt;/li&gt;
&lt;li&gt;This JSON data is sent back to our React frontend, where we can update the state with our newly fetched data.&lt;/li&gt;
&lt;li&gt;Since our state got updated, React will re-render the components which depend on it, and subsequently, we replace our loading GIF with the sneakers information.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And that's how all the technologies work together. Do not fret if you did not understand it entirely just yet. Since this mechanism is so commonly used, you will eventually understand and master it. Let us now talk about some things we are yet to cover, such as authentication, authorization, and state management.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Authentication&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Most of the websites nowadays allow you to create a user account for yourself through sign-up and sign-in procedures. We want this functionality in our web application, don't we? Even the simplest of applications such as a to-do list can be made interesting if we can associate each to-do with the user who created it. So how do we authenticate a user? &lt;/p&gt;

&lt;p&gt;While signing up to a website, we essentially create a user with email and password fields and store them into our database. But here's a catch. It is a bad practice to store the user passwords in plaintext or as it is due to security reasons. To overcome this, we can hash the user passwords using some strong hashing algorithm to secure them. I use the &lt;code&gt;bcryptjs&lt;/code&gt; package from npm for this purpose.&lt;/p&gt;

&lt;p&gt;Another option is to use OAuth, such as Google OAuth, to sign up the user to our website using his/her Google account. This saves us the hassle of manually taking care of all the security measures but adds complexity to the project due to handling API keys for OAuth with care.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Authorization&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the simplest terms, authorization is to restrict some routes to only specific types of users. For example, we do not want a user who's not logged in to place an order since we need to bind the user to each order. Similarly, we do not wish for any random user to delete someone else's account. Such functionality should be only restricted to admins. And that is why we need authorization.&lt;/p&gt;

&lt;p&gt;We can restrict access to our backend API using some conditions to prevent misuse through authorization. One of the most popular ways to implement authorization is to use JSON Web Tokens, or JWT for short. Whenever a user registers or logs in, we send back a token to the user. With this token being passed into headers during future API calls, we can uniquely identify the user by encoding the user ID in the payload. This can help us check whether the user is logged in, is an admin, and determine which user is accessing the routes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;State Management&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As your website grows, it is problematic to manage your global state. The user who is logged in can be an example of global state. Why? Because this information or state might be needed in multiple components, such as a navigation bar, profile card, and much more. Since we need to keep our shared state consistent across all the components which use it, having component level state with &lt;code&gt;useState&lt;/code&gt; will not be feasible.&lt;/p&gt;

&lt;p&gt;Another solution might be to store the state in the top-most component and pass it to other components that require it as props. Even this approach is not recommended as you might have to pass the state as props to multiple components and multiple levels, even to the components that do not require the state to pass the state from top-level component to bottom-level components. &lt;/p&gt;

&lt;p&gt;This is why we can use Context API or Redux to maintain a global store of state from which we can access the state in all the components we require, without passing it as props. While some argue that Redux is not needed ever since Context API came out, I still find lots of codebases using it, and it might be a good idea to learn it.&lt;/p&gt;




&lt;h2&gt;
  
  
  How To Become a MERN Stack Developer? &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Phew! That was a lot to take in. But the good thing is that you don't need to memorize any of it. Developers learn by doing, not memorizing! With that being said, you must be wondering how to become a MERN stack developer. That will be the prime focus of this section, where I'll be providing you with my own roadmap that you can take inspiration from and start your journey, whether you are new to web development or just exploring other tech stacks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;New to Web Development:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you're new to web development or even programming in general, I would highly recommend giving yourself enough time and learning the basics first. This includes how the web works, HTML, CSS, and JavaScript at first. Once you're comfortable building static websites with them, you can either choose to learn a JavaScript framework like React or explore the backend path with NodeJS. The way you choose is up to you, but ultimately, you'll have to learn both of them. A fantastic way to sharpen your skills is by making &lt;a href="https://thesmartcoder.dev/9-awesome-projects-you-can-build-with-vanilla-javascript/" rel="noopener noreferrer"&gt;javascript projects for beginners&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;My recommended learning path would be:&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%2Fres.cloudinary.com%2Fdh8m4lgft%2Fimage%2Fupload%2Fv1610649379%2Fwebsite-images%2FR4cjez6_t5kynm.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%2Fres.cloudinary.com%2Fdh8m4lgft%2Fimage%2Fupload%2Fv1610649379%2Fwebsite-images%2FR4cjez6_t5kynm.png" alt="Beginner Roadmap"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So we start with the basics, understanding the web, and delving into the frontend world, and starting with HTML, CSS and JavaScript so that you can build some awesome static websites such as landing pages with responsive design. Using a version control system like Git is pretty crucial since you'll be using it quite a lot in the future. Guess what? You're already good enough to look for some freelance work. &lt;/p&gt;

&lt;p&gt;Before writing some backend code, you should understand HTTP and the HTTP methods such as GET and POST. For the MERN stack, you'll use NodeJS in combination with ExpressJS to layout your backend. For interacting with your MongoDB database, you can use mongoose. Add a bit of authentication and authorization skills, and you're ready to build a full-stack web application. &lt;/p&gt;

&lt;p&gt;Finally, we return to the frontend and get our hands on React, a framework (technically, a library) that will take your websites and developer experience to the next level. You can see yourself building social network web apps, e-commerce web apps, and virtually any web app you want with the help of whatever you've learned so far. Exciting!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Experienced Developers Switching Tech Stack:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While the roadmap remains the same for even experienced developers, you can skip the HTML, CSS, and JavaScript parts. You may already be familiar with it and focus on grasping a good understanding of NodeJS how it works. Due to your previous knowledge of a different tech stack, I'm confident that you'll be able to adapt NodeJS pretty soon. Making careful decisions on how to better architecture your web app, optimizing it, and writing clean code will definitely give you an advantage over others. &lt;/p&gt;




&lt;h2&gt;
  
  
  Resources &amp;amp; Tools &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;A quick note&lt;/strong&gt;: You certainly do not watch each of these resources. Pick whatever you like the go with it. One of the mistakes that I made was that I kept switching between multiple resources due to the fear of missing out. Trust me, and you'll be fine. All of these resources are amazing and equally good. And you don't necessarily have to pick from just this list. A quick YouTube or Google search will also do.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Free Courses&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ" rel="noopener noreferrer"&gt;FreeCodeCamp YouTube Channel&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;HTML, CSS and JavaScript:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=UB1O30fR-EE&amp;amp;list=PLillGF-RfqbZTASqIqdvm1R5mLrQq79CU" rel="noopener noreferrer"&gt;HTML &amp;amp; CSS Playlist by Brad Traversy&lt;/a&gt; - Crash courses &amp;amp; tons of awesome projects.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=Xm4BObh4MhI" rel="noopener noreferrer"&gt;12HR+ YouTube Coding Bootcamp 2021! by Ania Kubow&lt;/a&gt; - Learn HTML, CSS and JavaScript in a single video.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=hu-q2zYwEYs&amp;amp;list=PL4cUxeGkcC9ivBf_eKCPIAYXWzLlPAm6G" rel="noopener noreferrer"&gt;HTML &amp;amp; CSS Playlist by The Net Ninja&lt;/a&gt; - Byte sized videos to keep your interested.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=hdI2bqOjy3c&amp;amp;list=PLillGF-RfqbbnEGy3ROiLWk7JMCuSyQtX" rel="noopener noreferrer"&gt;Vanilla JavaScript Playlist by Brad Traversy&lt;/a&gt; - Solidify your JavaScript knowledge with lots of projects.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=iWOYAxlnaww&amp;amp;list=PL4cUxeGkcC9haFPT7J25Q9GRB_ZkFrQAc" rel="noopener noreferrer"&gt;Modern JavaScript Playlist by The Net Ninja&lt;/a&gt; - Learn modern JavaScript including ES6&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=x2RNw4M6cME" rel="noopener noreferrer"&gt;JavaScript for Beginners Course (2020) by Colt Steele&lt;/a&gt; - Get yourself started with JavaScript in a couple of hours.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;NodeJS, ExpressJS &amp;amp; MongoDB:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=fBNz5xF-Kx4&amp;amp;list=PLillGF-RfqbZ2ybcoD2OaabW2P7Ws8CWu" rel="noopener noreferrer"&gt;NodeJS Playlist by Brad Traversy&lt;/a&gt; - Gem of a resource for all things NodeJS&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=zQRrXTSkvfw" rel="noopener noreferrer"&gt;NodeJS Crash Course by Dev Ed&lt;/a&gt; - Make learning NodeJS fun &lt;/p&gt;

&lt;p&gt;&lt;a href="//youtube.com/watch?v=vjf774RKrLc"&gt;Building a RESTful API with Express &amp;amp; MongoDB by Dev Ed&lt;/a&gt; - Learn to build a REST API &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=2jqok-WgelI" rel="noopener noreferrer"&gt;NodeJS Authentication with JWT by Dev Ed&lt;/a&gt; - Explore authentication and authorization&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=VELru-FCWDM" rel="noopener noreferrer"&gt;Introduction to MongoDB by Academind&lt;/a&gt; - Get yourself familiar with MongoDB&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=5QEwqX5U_2M" rel="noopener noreferrer"&gt;MongoDB + Mongoose + Node.js Crash Course by Codedamn&lt;/a&gt; - Teach yourself backend in an hour&lt;/p&gt;

&lt;p&gt;&lt;em&gt;React &amp;amp; Redux:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=j942wKiXFu8&amp;amp;list=PL4cUxeGkcC9gZD-Tvwfod2gaISzfRiP9d" rel="noopener noreferrer"&gt;Modern React Playlist by The Net Ninja&lt;/a&gt; - Byte sized, up to date React tutorials&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=O6P86uwfdR0&amp;amp;list=PLZlA0Gpn_vH8EtggFGERCwMY5u5hOjf-h" rel="noopener noreferrer"&gt;React Hooks Playlist by Web Dev Simplified&lt;/a&gt; - Learn all about React Hooks in a single playlist&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=15YB__vYpuA" rel="noopener noreferrer"&gt;React Crash Course 2020 by Codedamn&lt;/a&gt; - Understand React by building a big project&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=XuFDcZABiDQ&amp;amp;list=PLillGF-RfqbY3c2r0htQyVbDJJoBFE6Rb" rel="noopener noreferrer"&gt;React Projects Playlist by Traversy Media&lt;/a&gt; - Build amazing React projects&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=CVpUuw9XSjY" rel="noopener noreferrer"&gt;Redux for Beginners for Dev Ed&lt;/a&gt; - Get to know about Redux in a fun way&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=3sjMRS1gJys" rel="noopener noreferrer"&gt;Redux Explanation by Stephen Grider&lt;/a&gt; - One of the best explanations of Redux&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tools To Use&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://code.visualstudio.com/download" rel="noopener noreferrer"&gt;Visual Studio Code&lt;/a&gt; - Free, open source and one of the best text editors&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.figma.com/downloads/" rel="noopener noreferrer"&gt;Figma&lt;/a&gt; - The collaborative interface design tool&lt;/p&gt;

&lt;p&gt;&lt;a href="https://desktop.github.com/" rel="noopener noreferrer"&gt;GitHub Desktop&lt;/a&gt; - Desktop client for GitHub&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developers.google.com/web/tools/lighthouse" rel="noopener noreferrer"&gt;Google Lighthouse&lt;/a&gt; - Test your website's performance and SEO&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en" rel="noopener noreferrer"&gt;React Developer Tools&lt;/a&gt; - Chrome extension for testing React websites&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en" rel="noopener noreferrer"&gt;Redux DevTools&lt;/a&gt; - Chrome extension for testing Redux&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chrome.google.com/webstore/detail/json-viewer/gbmdgpbipfallnflgajpaliibnhdgobh?hl=en" rel="noopener noreferrer"&gt;JSON Viewer&lt;/a&gt; - Chrome extension for display JSON in a much more readable manner&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chrome.google.com/webstore/detail/whatruns/cmkdbmfndkfgebldhnkbfhlneefdaaip?hl=en" rel="noopener noreferrer"&gt;WhatRuns&lt;/a&gt; - Check what tech stack your favorite website uses&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.postman.com/" rel="noopener noreferrer"&gt;Postman&lt;/a&gt; - Test your APIs&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Design Resources&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/bradtraversy/design-resources-for-developers" rel="noopener noreferrer"&gt;Design Resources for Developers&lt;/a&gt; - A repo full of tons of design resources&lt;/p&gt;

&lt;p&gt;&lt;a href="https://coolors.co/" rel="noopener noreferrer"&gt;Coolors&lt;/a&gt; - Generate color schemes with ease&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.grabient.com/" rel="noopener noreferrer"&gt;Grabient&lt;/a&gt; - Awesome gradient colors&lt;/p&gt;

&lt;p&gt;&lt;a href="https://fonts.google.com/" rel="noopener noreferrer"&gt;Google Fonts&lt;/a&gt; - Fonts to use in your websites&lt;/p&gt;

&lt;p&gt;&lt;a href="https://fontawesome.com/" rel="noopener noreferrer"&gt;FontAwesome&lt;/a&gt; - Collections of icon fonts&lt;/p&gt;




&lt;h2&gt;
  
  
  Let's Look at the Alternatives &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;There are many ways to achieve the same result when it comes to programming. Web development is no exception. Let's look at some popular alternatives to the MERN stack.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The MEVN Stack&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The MEVN stack uses Vue instead of React in the frontend. VueJS is an open-source JavaScript framework with over 175k+ stars on GitHub and is undoubtedly a popular choice. It is considered to be easier to learn than React, but since it falls behind a bit when it comes to the number of jobs available for Vue developers comparatively. However, the framework itself is incredible and worth trying. It's also not backed by any corporations, unlike React and Angular.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The MEAN Stack&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Talking of Angular, it is also a frontend framework that uses TypeScript instead of JavaScript to build web applications. It is arguably the hardest to learn compared to React and Vue but also used by lots of enterprises. It is developed by Google and focuses on high performance and MVC architecture.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Words &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Being a developer is not easy. There are a lot of new advancements, frameworks, and technologies that keep coming out, and staying up to date is hard. Do not give in to the shiny object syndrome and believe in the process. Allow yourself to take time and make mistakes. We all learn from that. I hope this guide helped you to get started with the MERN stack. Good luck ahead!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Technologies That I'll Be Learning in 2021 as a MERN Stack Developer (with resources)</title>
      <dc:creator>Nitin Ranganath</dc:creator>
      <pubDate>Tue, 05 Jan 2021 08:31:47 +0000</pubDate>
      <link>https://dev.to/itsnitinr/technologies-that-i-ll-be-learning-in-2021-as-a-mern-stack-developer-with-resources-4pci</link>
      <guid>https://dev.to/itsnitinr/technologies-that-i-ll-be-learning-in-2021-as-a-mern-stack-developer-with-resources-4pci</guid>
      <description>&lt;p&gt;Hi Dev Community!&lt;/p&gt;

&lt;p&gt;2020 has been a year of learning for me and I'm positive that this has been the case for tons of other self taught developers out there. From React to Redux, 2020 has shaped me into becoming a full stack developer, something that I'm passionate about.&lt;/p&gt;

&lt;p&gt;Going forward, I have decided to learn the following technologies in 2021. While this is not a 'top 10' list for things that you SHOULD learn, this is just my take on it. Having said that, please feel free to share your opinions or suggest new technologies. I've also left some &lt;strong&gt;links to free resources&lt;/strong&gt; for learning all the technologies I talk about. Alright, enough talk. Let's dive into the main stuff.&lt;/p&gt;




&lt;h2&gt;
  
  
  TypeScript
&lt;/h2&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%2Fi%2Fy38cozt2ehmd04k6v1ia.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%2Fi%2Fy38cozt2ehmd04k6v1ia.png" alt="TypeScript Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One thing that I was grateful for in 2020 was that I was able to build big projects, to a level that it was becoming kind of tedious to keep up with the bugs and potential issues that were popping up. Enter TypeScript! I've heard lots of people praising TypeScript for exactly solving this problem. Since it's also used in lots of production level projects, I see no reason to avoid TypeScript.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resources to get started:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=BwuLxPH8IDs" rel="noopener noreferrer"&gt;TypeScript Tutorial by Academind on YouTube&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=2pZmKW9-I_k&amp;amp;list=PL4cUxeGkcC9gUgr39Q_yD6v-bSyMwKPUI" rel="noopener noreferrer"&gt;TypeScript Playlist by The Net Ninja on YouTube&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  React-Query
&lt;/h2&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%2Fi%2Fusw6exics24fu4lothyr.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%2Fi%2Fusw6exics24fu4lothyr.png" alt="React Query Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm excited for this one. So what exactly is react-query, you ask? It is a NPM package which you can use to asynchronously fetch data from an API. That's the simplest explanation that I could come up with. But hey, doesn't Redux with Axios do the same? Yes, but react-query comes with features such as auto-caching, garbage collection, infinite scroll and much more! Definitely something which you can use to improve your developer experience as well as performance. By the way, if you use Redux, you might want to checkout &lt;a href="https://redux-toolkit.js.org/" rel="noopener noreferrer"&gt;Redux Toolkit&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resources to get started:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=x1rQ61otgtU&amp;amp;list=PL4cUxeGkcC9jpi7Ptjl5b50p9gLjOFani" rel="noopener noreferrer"&gt;React Query Playlist by The Net Ninja on YouTube&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=9lCmbth63k0" rel="noopener noreferrer"&gt;Redux Toolkit by Justim Kim on YouTube&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Tailwind CSS
&lt;/h2&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%2Fi%2Fp1lca5prytimv01lk6hy.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%2Fi%2Fp1lca5prytimv01lk6hy.png" alt="Tailwind CSS Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I've used Bootstrap, Materialialize CSS and Bulma in the past. But somehow, Tailwind CSS still manages to excite me. I've heard great things about it and have also seen some stunning websites built using it. I'm aware of how it is a bit different from other CSS frameworks out there but that's where the fun lies. For the React side of things, I also want to explore &lt;a href="http://material-ui.com/" rel="noopener noreferrer"&gt;Material UI&lt;/a&gt; a bit more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resources to get started:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=UBOj6rqRUME" rel="noopener noreferrer"&gt;Tailwind CSS Crash Course by Brad Traversy on YouTube&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=vAaZoYhQQRg" rel="noopener noreferrer"&gt;Tailwind CSS 2.0 Crash Course by codedamn on YouTube&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=bxmDnn7lrnk&amp;amp;list=PL4cUxeGkcC9gpXORlEHjc5bgnIi5HEGhw" rel="noopener noreferrer"&gt;Tailwind CSS Playlist by The Net Ninja on YouTube&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  NextJS
&lt;/h2&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%2Fi%2Fpvpibz726khxt7y7227q.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%2Fi%2Fpvpibz726khxt7y7227q.png" alt="NextJS Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next is great! I tried it for a brief period of time around the end of 2020 and I see no reason why I shouldn't take it up and use it in my own projects. If you're a React developer, the learning curve is pretty smooth. The benefits it brings, such as server side rendering and automatic image optimization make it well worth learning. Highly recommend it for all the React devs out there.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resources to get started:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://codedamn.com/learn/nextjs-fundamentals" rel="noopener noreferrer"&gt;Next.js Fundamentals by Mehul Mohan on codedamn&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=7J4iL1HDshQ&amp;amp;list=PLYSZyzpwBEWSQsrukurP09ksi49H9Yj40" rel="noopener noreferrer"&gt;Next.js Playlist by Bruno Antunes on YouTube&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  GraphQL
&lt;/h2&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%2Fi%2Fxavgwcqgls5oak2twssx.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%2Fi%2Fxavgwcqgls5oak2twssx.png" alt="GraphQL Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GraphQL is a query language for fetching data from APIs. What makes it great is that it is capable of exactly what is requested for and getting multiple resources in a single request, thus saving us multiple requests to the API server and improving the performance. I've only been using REST APIs till now and excited to see how GraphQL can improve my future projects. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resources to get started:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=ZQL7tL2S0oQ" rel="noopener noreferrer"&gt;Learn GraphQL by Web Dev Simplified on YouTube&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=Y0lDGjwRYKw&amp;amp;list=PL4cUxeGkcC9iK6Qhn-QLcXCXPQUov1U7f" rel="noopener noreferrer"&gt;GraphQL Playlist by The Net Ninja on YouTube&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  PostgreSQL
&lt;/h2&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%2Fi%2F5dzs4l7i7agq973q2p88.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%2Fi%2F5dzs4l7i7agq973q2p88.png" alt="PostgreSQL Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PostgreSQL or basically SQL databases are something that I've been wanting to give a try for quite some time now. I have used MongoDB my database needs in all my previous projects. I appreciate the freedom of NoSQL databases but SQL databases are widely used as well and can be a better option in some  cases. Getting good at SQL and SQL databases is going to be one of my priorities this year.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resources to get started:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=qw--VYLpxG4" rel="noopener noreferrer"&gt;PostgreSQL Tutorial by FreeCodeCamp on YouTube&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Jest
&lt;/h2&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%2Fi%2F8jo1fik6r5h6mi14u34v.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%2Fi%2F8jo1fik6r5h6mi14u34v.png" alt="Jest Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Jest is a JavaScript testing framework which can be used to test your Node, React, Angular, Vue, TypeScript and other JavaScript code. I'm no fan of testing currently but it is such as essential skills which can differentiate two programmers especially when it comes to large projects. I have not delved deep into knowing more about Jest but from my limited research, it aims to do what I want.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resouces to get started:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=7r4xVDI2vho" rel="noopener noreferrer"&gt;Jest Crash Course by Brad Traversy on YouTube&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=FgnxcUQ5vho" rel="noopener noreferrer"&gt;Jest Introduction by Web Dev Simplified on YouTube&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Advanced JavaScript
&lt;/h2&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%2Fi%2F4rpy2f4wa0bnsudcukq5.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%2Fi%2F4rpy2f4wa0bnsudcukq5.png" alt="JS Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wait, what? JavaScript? Well, yes but no. Advanced JavaScript concepts such as V8 Engine, closures, hoisting, event loop, threads, binding and much more. The MERN stack is fully JavaScript and so it makes sense to get a good grasp over JavaScript, right? People do tend to miss out on the above mentioned topics when they're first learning JS and rightly so. However, it's good to go back to plain JavaScript once in a while to learn these topics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resources to get started:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.udemy.com/course/advanced-javascript-concepts/" rel="noopener noreferrer"&gt;Advanced JavaScript Concepts by Andrei Neagoie on Udemy (Paid)&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  React Native
&lt;/h2&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%2Fi%2Fn64o5wu72ee56pd7fhd4.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%2Fi%2Fn64o5wu72ee56pd7fhd4.png" alt="RN Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Websites are great, no doubt! But the ease of use that applications provide make it a valuable skill to learn. I personally felt that I could get more users on my projects if only I had a mobile application on top of the website. React Native seems to be a good choice since I already know React and can hugely benefit me through code reuse. There's also Flutter, which uses Dart if you like that more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resources to get started:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=Hf4MJH0jDb4" rel="noopener noreferrer"&gt;React Native Crash Course by Brad Traversy on YouTube&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=qSRrxpdMpVc" rel="noopener noreferrer"&gt;React Native Tutorial by Academind on YouTube&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=ur6I5m2nTvk&amp;amp;list=PL4cUxeGkcC9ixPU-QkScoRBVxtPPzVjrQ" rel="noopener noreferrer"&gt;React Native Playlist by The Net Ninja on YouTube&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Some Honourable Mentions
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Serverless technologies such as AWS&lt;/li&gt;
&lt;li&gt;Framer Motion&lt;/li&gt;
&lt;li&gt;GSAP&lt;/li&gt;
&lt;li&gt;HTML Canvas&lt;/li&gt;
&lt;li&gt;UI/UX&lt;/li&gt;
&lt;li&gt;Docker and Kubernetes&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;So that was list of technologies to learn this year. I'd love to see yours too! Drop a comment if you feel like sharing yours. Thanks for reading!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>typescript</category>
      <category>react</category>
      <category>node</category>
    </item>
  </channel>
</rss>
