<?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: Atul Bhatt</title>
    <description>The latest articles on DEV Community by Atul Bhatt (@atulbhattsystem32).</description>
    <link>https://dev.to/atulbhattsystem32</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F405966%2F032069cf-041f-480e-bd92-97b44c28e8a9.png</url>
      <title>DEV Community: Atul Bhatt</title>
      <link>https://dev.to/atulbhattsystem32</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/atulbhattsystem32"/>
    <language>en</language>
    <item>
      <title>How We Achieved a 99 PageSpeed Score: A Real-World Web Performance Case Study</title>
      <dc:creator>Atul Bhatt</dc:creator>
      <pubDate>Sun, 06 Sep 2026 10:21:32 +0000</pubDate>
      <link>https://dev.to/atulbhattsystem32/how-we-achieved-a-99-pagespeed-score-a-real-world-web-performance-case-study-3e3n</link>
      <guid>https://dev.to/atulbhattsystem32/how-we-achieved-a-99-pagespeed-score-a-real-world-web-performance-case-study-3e3n</guid>
      <description>&lt;p&gt;Most web agencies and SaaS websites suffer from a silent conversion killer: &lt;strong&gt;terrible mobile performance&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It’s surprisingly easy to get a 95+ score on desktop when running Lighthouse on an M3 MacBook over high-speed fiber. But when you switch that toggle to &lt;strong&gt;Mobile&lt;/strong&gt;—where Google simulates an emulated budget Android device throttled to a 1.6 Mbps 4G connection with 150ms round-trip latency—the score crumbles into the 40s–70s.&lt;/p&gt;

&lt;p&gt;When we audited the initial release of &lt;a href="https://klickspell.com" rel="noopener noreferrer"&gt;Klickspell&lt;/a&gt;, we hit a familiar plateau: our desktop score was 99, but mobile was lagging with sluggish paint times, render-blocking chains, and cumulative layout shifts.&lt;/p&gt;

&lt;p&gt;We didn't want a "good enough" 85. We wanted &lt;strong&gt;98–99 on Mobile&lt;/strong&gt; and &lt;strong&gt;99 on Desktop&lt;/strong&gt; with &lt;strong&gt;0 ms Total Blocking Time (TBT)&lt;/strong&gt; and &lt;strong&gt;zero layout shift (CLS: 0)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here is the exact, step-by-step engineering playbook we followed to get there.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Audit: Diagnosing the Bottlenecks
&lt;/h2&gt;

&lt;p&gt;Before touching a single line of code, we ran a thorough audit using Google PageSpeed Insights and Chrome DevTools. Here were the primary culprits flagged:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Massive Image Payloads:&lt;/strong&gt; 30 uncompressed raster graphics totaling &lt;strong&gt;49.08 MB&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Render-Blocking CSS &amp;amp; Chained Requests:&lt;/strong&gt; An external stylesheet (&lt;code&gt;style.css&lt;/code&gt;) caused a 606 ms round-trip delay.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Pages 10-Minute Cache Warning:&lt;/strong&gt; Static files served with &lt;code&gt;Cache-Control: max-age=600&lt;/code&gt;, triggering Lighthouse's "Use efficient cache lifetimes" penalty.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Forced Reflow / Layout Thrashing:&lt;/strong&gt; A JavaScript breakpoint handler reading &lt;code&gt;window.innerWidth&lt;/code&gt; during initial page parse.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1,450 ms LCP Element Render Delay:&lt;/strong&gt; Above-the-fold entrance animations delaying text paint.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;External Font Network Round-Trips:&lt;/strong&gt; 67 KiB of Google Fonts across 10 weights requested over external connections.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's break down how we solved each of these.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Asset Optimization: 49 MB ➔ 3.3 MB (93.2% Reduction)
&lt;/h2&gt;

&lt;p&gt;The biggest payload culprit was high-resolution PNG and JPG images in project mockups and case studies. Serving raw raster images to a mobile device on a 4G network is an immediate death sentence for page speed.&lt;/p&gt;

&lt;p&gt;We ran a batch conversion using Google's &lt;code&gt;cwebp&lt;/code&gt; encoder at quality 82:&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="k"&gt;for &lt;/span&gt;img &lt;span class="k"&gt;in &lt;/span&gt;public/assets/&lt;span class="k"&gt;**&lt;/span&gt;/&lt;span class="k"&gt;*&lt;/span&gt;.png&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;cwebp &lt;span class="nt"&gt;-q&lt;/span&gt; 82 &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$img&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;img&lt;/span&gt;&lt;span class="p"&gt;%.png&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;.webp"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Rules We Applied to Every Image:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Format:&lt;/strong&gt; Converted all 30 raster graphics to &lt;code&gt;.webp&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dimensions:&lt;/strong&gt; Added explicit &lt;code&gt;width&lt;/code&gt; and &lt;code&gt;height&lt;/code&gt; attributes to all &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tags to give the browser aspect-ratio context, eliminating Cumulative Layout Shift.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lazy Loading:&lt;/strong&gt; Added &lt;code&gt;loading="lazy"&lt;/code&gt; and &lt;code&gt;decoding="async"&lt;/code&gt; to every single below-the-fold image across the homepage, team page, and case studies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt; Total image weight dropped from &lt;strong&gt;49.08 MB down to 3.33 MB&lt;/strong&gt;—a &lt;strong&gt;45.75 MB saving&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Inlining Critical CSS to Kill the Render-Blocking Chain
&lt;/h2&gt;

&lt;p&gt;PageSpeed reported:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“Chained requests / Network dependency tree: ...css/style.css (606 ms)”&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;“Use efficient cache lifetimes — Est savings of 8 KiB (Cache TTL: 10m)”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  The Problem:
&lt;/h3&gt;

&lt;p&gt;Loading styles via an external link (&lt;code&gt;&amp;lt;link rel="stylesheet" href="/assets/css/style.css" /&amp;gt;&lt;/code&gt;) forces the browser to halt HTML parsing, initiate a new TCP connection, and download the stylesheet before painting the very first pixel. Furthermore, GitHub Pages enforces a default &lt;code&gt;Cache-Control: max-age=600&lt;/code&gt; (10 minutes) on static files, which triggers Lighthouse caching warnings.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Fix:
&lt;/h3&gt;

&lt;p&gt;Because our global stylesheet was compact (~9 KiB gzipped), we configured Astro to inline all CSS directly into the HTML document:&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;// astro.config.mjs&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;defineConfig&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;astro/config&lt;/span&gt;&lt;span class="dl"&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="nf"&gt;defineConfig&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;site&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://klickspell.com&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;format&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;file&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;inlineStylesheets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;always&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="c1"&gt;// Inlines CSS directly into &amp;lt;style&amp;gt; in &amp;lt;head&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;And in &lt;code&gt;BaseLayout.astro&lt;/code&gt;, we imported the CSS directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
import '../styles/style.css';
---
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;0 external render-blocking requests.&lt;/strong&gt; The browser receives the markup and styling in a single HTTP response.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cache warning eliminated.&lt;/strong&gt; Because &lt;code&gt;style.css&lt;/code&gt; is no longer a separate file, the 10-minute cache lifetime alert vanished.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Eliminating Forced Reflow / Layout Thrashing
&lt;/h2&gt;

&lt;p&gt;In the diagnostic report, Lighthouse highlighted:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“Avoid forced reflow: BaseLayout.astro:101:23”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When inspecting the code, we found this innocent-looking helper:&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;// ❌ THE PROBLEM: Layout Thrashing in JS&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;swapCTA&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isMobile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerWidth&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;768&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Triggers synchronous layout calculation&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;hero-cta-d&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;isMobile&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;none&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;inline-flex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;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;hero-cta-m&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;isMobile&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;inline-flex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;none&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nf"&gt;swapCTA&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;resize&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;swapCTA&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Why This Hurts:
&lt;/h3&gt;

&lt;p&gt;Querying &lt;code&gt;window.innerWidth&lt;/code&gt; forces the browser engine to stop and compute geometry synchronously before the DOM is even painted. When executed alongside DOM modifications (&lt;code&gt;.style.display&lt;/code&gt;), it causes &lt;strong&gt;layout thrashing&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Fix: Pure CSS Media Queries
&lt;/h3&gt;

&lt;p&gt;We deleted the entire JavaScript function and replaced it with pure CSS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* ✅ THE SOLUTION: Zero-JS Responsive Toggle */&lt;/span&gt;
&lt;span class="nf"&gt;#hero-cta-d&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;#cta-d&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;inline-flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nf"&gt;#hero-cta-m&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;#cta-m&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;768px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;#hero-cta-d&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;#cta-d&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt; &lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nf"&gt;#hero-cta-m&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;#cta-m&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;inline-flex&lt;/span&gt; &lt;span class="cp"&gt;!important&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;strong&gt;Result:&lt;/strong&gt; 0 ms JavaScript execution, zero layout recalculations, and an instant response during viewport changes.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Killing the 1,450 ms LCP Element Render Delay
&lt;/h2&gt;

&lt;p&gt;In our mobile LCP breakdown, Lighthouse reported:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“Element render delay: 1,450 ms — &lt;code&gt;&amp;lt;p class="hero-note-mobile"&amp;gt;&lt;/code&gt;”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Why Was Text Rendering Delayed?
&lt;/h3&gt;

&lt;p&gt;We had styled our hero section with subtle entrance animations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* ❌ Starts at opacity: 0 with sequential delays */&lt;/span&gt;
&lt;span class="nc"&gt;.hero-headline-mobile&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;animation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fadeUp&lt;/span&gt; &lt;span class="m"&gt;.7s&lt;/span&gt; &lt;span class="m"&gt;.1s&lt;/span&gt; &lt;span class="n"&gt;ease&lt;/span&gt; &lt;span class="nb"&gt;both&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.hero-sub-mobile&lt;/span&gt;      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;animation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fadeUp&lt;/span&gt; &lt;span class="m"&gt;.7s&lt;/span&gt; &lt;span class="m"&gt;.2s&lt;/span&gt; &lt;span class="n"&gt;ease&lt;/span&gt; &lt;span class="nb"&gt;both&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.hero-actions&lt;/span&gt;         &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;animation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fadeUp&lt;/span&gt; &lt;span class="m"&gt;.7s&lt;/span&gt; &lt;span class="m"&gt;.3s&lt;/span&gt; &lt;span class="n"&gt;ease&lt;/span&gt; &lt;span class="nb"&gt;both&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@keyframes&lt;/span&gt; &lt;span class="n"&gt;fadeUp&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nt"&gt;from&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;opacity&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;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nt"&gt;to&lt;/span&gt;   &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;opacity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateY&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="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;Because &lt;code&gt;fadeUp&lt;/code&gt; starts at &lt;code&gt;opacity: 0&lt;/code&gt; with sequential delays up to 0.4s, the throttled mobile CPU kept the text transparent or moving during the first 1.4 seconds. &lt;strong&gt;Lighthouse measures LCP at the moment an element finishes animating to its final state and opacity.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Fix:
&lt;/h3&gt;

&lt;p&gt;On desktop, smooth animations add polish. On mobile, instant clarity matters more. We disabled entrance animations for mobile hero elements:&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;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;768px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;.hero-headline-mobile&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
  &lt;span class="nc"&gt;.hero-sub-mobile&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
  &lt;span class="nc"&gt;.hero-note-mobile&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
  &lt;span class="nc"&gt;.hero-actions&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;animation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt; &lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;opacity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt; &lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.floating-cards&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt; &lt;span class="cp"&gt;!important&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;strong&gt;Result:&lt;/strong&gt; Text paints at &lt;strong&gt;100% opacity on frame zero&lt;/strong&gt;. Mobile LCP dropped from &lt;strong&gt;2.7s down to 1.4s&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Self-Hosting Fonts: Erasing Third-Party Latency
&lt;/h2&gt;

&lt;p&gt;Our initial setup loaded typography from Google Fonts:&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="c"&gt;&amp;lt;!-- 3 external requests, 2 DNS lookups, 67 KiB payload --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&amp;amp;family=Manrope:wght@300;400;500;600;700;800&amp;amp;family=DM+Mono:wght@400;500&amp;amp;display=swap"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On slow 4G mobile connections, negotiating SSL handshakes with &lt;code&gt;fonts.googleapis.com&lt;/code&gt; and &lt;code&gt;fonts.gstatic.com&lt;/code&gt; and downloading 10 separate font weights consumed &lt;strong&gt;~1.8 seconds&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Solution:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Switch to a Variable Font:&lt;/strong&gt; Downloaded a single &lt;code&gt;manrope-variable.woff2&lt;/code&gt; (just &lt;strong&gt;24 KB&lt;/strong&gt;) that natively supports every weight from 200 to 800.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-Host Everything:&lt;/strong&gt; Placed the font files in &lt;code&gt;/assets/fonts/&lt;/code&gt; directly on our own domain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Preload Critical Typography:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- BaseLayout.astro --&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;"preload"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/assets/fonts/manrope-variable.woff2"&lt;/span&gt; &lt;span class="na"&gt;as=&lt;/span&gt;&lt;span class="s"&gt;"font"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"font/woff2"&lt;/span&gt; &lt;span class="na"&gt;crossorigin&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"preload"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/assets/fonts/instrument-serif-regular.woff2"&lt;/span&gt; &lt;span class="na"&gt;as=&lt;/span&gt;&lt;span class="s"&gt;"font"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"font/woff2"&lt;/span&gt; &lt;span class="na"&gt;crossorigin&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And in CSS:&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;@font-face&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="s2"&gt;'Manrope'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;normal&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;200&lt;/span&gt; &lt;span class="m"&gt;800&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;font-display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;swap&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url('/assets/fonts/manrope-variable.woff2')&lt;/span&gt; &lt;span class="n"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;'woff2'&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;strong&gt;Result:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;0 third parties&lt;/strong&gt; in the entire Lighthouse network tab.&lt;/li&gt;
&lt;li&gt;First Contentful Paint (FCP) dropped from &lt;strong&gt;2.7s down to 1.1s&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. Zero JavaScript on the Mobile Main Thread
&lt;/h2&gt;

&lt;p&gt;Modern browsers on touch devices already have hardware-accelerated 120Hz momentum scrolling. Loading smooth-scrolling libraries (like Lenis) or custom cursor tracking loops on mobile achieves nothing while draining battery and hogging the main thread.&lt;/p&gt;

&lt;p&gt;We refactored our client scripts to run &lt;strong&gt;strictly on desktop devices with fine pointers&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Run custom cursor and Lenis only on desktop mouse devices&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;matchMedia&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;(pointer: fine)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;matches&lt;/span&gt;&lt;span class="p"&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/assets/js/lenis.mjs&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(({&lt;/span&gt; &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Lenis&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;lenis&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;Lenis&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;lerp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.08&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;smoothWheel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="c1"&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="c1"&gt;// Pure native scroll listener for mobile&lt;/span&gt;
  &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;scroll&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="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;nav&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)?.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toggle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;scrolled&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scrollY&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;passive&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Additionally, we deferred our third-party Cal.com scheduling embed until first user interaction (&lt;code&gt;scroll&lt;/code&gt;, &lt;code&gt;touchstart&lt;/code&gt;, or idle):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;loadCal&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_calLoaded&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="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_calLoaded&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="c1"&gt;// Initialize embed script...&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;scroll&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;touchstart&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;mousemove&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;click&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;evt&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; 
  &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;evt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;loadCal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;once&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;passive&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt; &lt;strong&gt;Total Blocking Time (TBT) dropped to a flat 0 ms&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Final Numbers
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Before Optimization&lt;/th&gt;
&lt;th&gt;After Optimization&lt;/th&gt;
&lt;th&gt;Improvement&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Mobile Performance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;91 / 100&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;98 / 100&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+7 Points&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Desktop Performance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;99 / 100&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;99 / 100&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Rock Solid&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;First Contentful Paint (Mobile)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2.7 s&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.1 s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;59% Faster&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Largest Contentful Paint (Mobile)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2.7 s&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.4 s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;48% Faster&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total Blocking Time (TBT)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;54 ms&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0 ms&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100% Non-blocking&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cumulative Layout Shift (CLS)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0.003&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Zero Shift&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total Asset Payload&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~50 MB&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~3.4 MB&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;93% Reduction&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Third-Party Requests on Load&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Completely Eliminated&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Key Lessons for Web Engineers
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Test mobile first and believe the throttling:&lt;/strong&gt; Desktop scores are forgiving. If your site doesn't load fast on an emulated 4G budget device, your real-world mobile visitors are leaving.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inline small CSS:&lt;/strong&gt; If your stylesheet is under 15–20 KB gzipped, inlining eliminates an entire round-trip network waterfall.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Beware of entrance animations:&lt;/strong&gt; Any CSS animation starting with &lt;code&gt;opacity: 0&lt;/code&gt; or moving layout elements above the fold will artificially inflate your LCP time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-host your fonts:&lt;/strong&gt; Google Fonts is great for rapid prototyping, but self-hosting variable &lt;code&gt;.woff2&lt;/code&gt; files eliminates external handshakes and saves 300–800ms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep mobile JS-free:&lt;/strong&gt; If an interaction (like smooth scrolling or mouse rings) doesn't apply to touchscreens, don't ship a single byte of it to mobile devices.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Performance isn't an afterthought or a plugin you toggle on at the end—it’s an engineering discipline baked into every component, style, and asset.&lt;/p&gt;

</description>
      <category>webperf</category>
      <category>corewebvitals</category>
      <category>lighthouse</category>
      <category>astro</category>
    </item>
    <item>
      <title>Const doesn't prevent immutability</title>
      <dc:creator>Atul Bhatt</dc:creator>
      <pubDate>Tue, 13 Jun 2023 15:03:59 +0000</pubDate>
      <link>https://dev.to/atulbhattsystem32/const-doesnt-prevent-immutability-21gc</link>
      <guid>https://dev.to/atulbhattsystem32/const-doesnt-prevent-immutability-21gc</guid>
      <description>&lt;h2&gt;
  
  
  What is a variable?
&lt;/h2&gt;

&lt;p&gt;In programming, a variable is a name given to a location in the #memory of the computer.&lt;/p&gt;

&lt;p&gt;Instead of treating the value of a variable as a number, string, etc. If we start looking at the &lt;strong&gt;value of a variable&lt;/strong&gt; as an &lt;strong&gt;address&lt;/strong&gt; to the &lt;strong&gt;location in a memory&lt;/strong&gt;, then it will make it easy to understand the concept of &lt;strong&gt;let&lt;/strong&gt; and &lt;strong&gt;const&lt;/strong&gt; in JavaScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  A mental model for understanding
&lt;/h2&gt;

&lt;p&gt;Consider &lt;strong&gt;const&lt;/strong&gt; keyword as representation for &lt;strong&gt;constant&lt;/strong&gt; word.&lt;/p&gt;

&lt;p&gt;And &lt;strong&gt;let&lt;/strong&gt; keyword as &lt;strong&gt;temporary&lt;/strong&gt;.&lt;br&gt;
for example, if you remember, solving equations in mathematics we often say.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;let us assume value of x is 10.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now, combining both knowledge: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;value of variable is an address&lt;/li&gt;
&lt;li&gt;const is for constant&lt;/li&gt;
&lt;li&gt;let is for temporary&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;it will start making sense for the statement below:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_const doesn't prevent immutability. It just prevents reassignment. _&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Examples
&lt;/h2&gt;

&lt;p&gt;Now, when I do:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;
&lt;span class="cm"&gt;/* A memory address is assigned to a (ex: M121312)
Now the value of "a" internally is "M121312")
If I try to do again: */&lt;/span&gt;

&lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt; 
&lt;span class="cm"&gt;/*A new memory space will be assigned to value 13 (ex: M121314) */&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;So, internally it seems like, we are trying to do reassign a value to a.&lt;/p&gt;

&lt;p&gt;This might feel vague for now. But hold on.&lt;/p&gt;

&lt;p&gt;Let's come to array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;45&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;56&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; 
&lt;span class="cm"&gt;/* b is assigned a memory address (M131314)
and when I do: */&lt;/span&gt;

&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt; 
&lt;span class="cm"&gt;/* it works because the address of b is not changed. 
The value of b is still (M131314)
However, if I do:
*/&lt;/span&gt;
&lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;45&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;56&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; 
&lt;span class="cm"&gt;/* it's a new value assignment, i.e., a new address (M131320) */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is just a &lt;strong&gt;mental model&lt;/strong&gt; to think about &lt;strong&gt;const&lt;/strong&gt; and &lt;strong&gt;let&lt;/strong&gt; that I came up with. I don't know if it's entirely correct or not.&lt;/p&gt;

&lt;p&gt;Tell me in the comments if it makes sense!&lt;/p&gt;

&lt;p&gt;As always thanks for reading. Stay curious!&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://klickspell.com/blog/const-doesnt-prevent-immutability-21gc" rel="noopener noreferrer"&gt;Klickspell Engineering&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Hot Reload Fails, DOM adds an additional iframe</title>
      <dc:creator>Atul Bhatt</dc:creator>
      <pubDate>Thu, 28 Apr 2022 16:41:47 +0000</pubDate>
      <link>https://dev.to/atulbhattsystem32/hot-reload-fails-dom-adds-an-additional-iframe-45e7</link>
      <guid>https://dev.to/atulbhattsystem32/hot-reload-fails-dom-adds-an-additional-iframe-45e7</guid>
      <description>&lt;p&gt;Hey React Developers🙋‍♂️, this your gateway to solving this problem if you're still facing this. I've &lt;strong&gt;tested&lt;/strong&gt; the solution in &lt;strong&gt;multiple React projects on various different devices with variety of OS and browsers.&lt;/strong&gt; Why? Because everyone in my team was facing this issue but were not frustrated enough to solve it which I was.&lt;/p&gt;

&lt;p&gt;I've gone through multiple github discussions and stackoverflow posts to finally reach this solution and then test it out.&lt;/p&gt;

&lt;p&gt;Let's see the &lt;strong&gt;symptoms&lt;/strong&gt; you're facing. Are they mentioned below:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Application becomes &lt;strong&gt;non-interactive, iframe&lt;/strong&gt; is added to DOM.&lt;/li&gt;
&lt;li&gt;Hot reload continues to work, but the page becomes unresponsive. &lt;strong&gt;Can't click or do anything unless you do a manual refresh.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;process is not defined
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Uncaught ReferenceError: process is not defined
at Object.4043 (&amp;lt;anonymous&amp;gt;:2:13168)
at r (&amp;lt;anonymous&amp;gt;:2:306599)
at Object.8048 (&amp;lt;anonymous&amp;gt;:2:9496)
at r (&amp;lt;anonymous&amp;gt;:2:306599)
at Object.8641 (&amp;lt;anonymous&amp;gt;:2:1379)
at r (&amp;lt;anonymous&amp;gt;:2:306599)
at &amp;lt;anonymous&amp;gt;:2:315627
at &amp;lt;anonymous&amp;gt;:2:324225
at &amp;lt;anonymous&amp;gt;:2:324229
at HTMLIFrameElement.e.onload (index.js:1)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You might have started facing this problem either after &lt;strong&gt;updating your CRA or starting a new project using create-react-app&lt;/strong&gt; which lead to the probable lead cause of it to be &lt;strong&gt;react-error-overlay.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can check the &lt;strong&gt;issue reported on github&lt;/strong&gt; &lt;a href="https://github.com/facebook/create-react-app/issues/11771" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  SOLUTION
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;npm i -D react-error-overlay@6.0.9&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If this doesn't helps, check &lt;a href="https://github.com/facebook/create-react-app/issues/11880#issuecomment-1005409614" rel="noopener noreferrer"&gt;this&lt;/a&gt; out.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;If this solution solves your problem, do like this post or comment down so that others can also get the benefit by reaching to it as early as possible. Till then safe debugging👍&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://klickspell.com/blog/hot-reload-fails-dom-adds-an-additional-iframe-45e7" rel="noopener noreferrer"&gt;Klickspell Engineering&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>help</category>
      <category>discuss</category>
      <category>webpack</category>
    </item>
    <item>
      <title>Useful Tips for Web Dev - Part1</title>
      <dc:creator>Atul Bhatt</dc:creator>
      <pubDate>Wed, 27 Apr 2022 16:54:36 +0000</pubDate>
      <link>https://dev.to/atulbhattsystem32/useful-tips-for-web-dev-part1-5061</link>
      <guid>https://dev.to/atulbhattsystem32/useful-tips-for-web-dev-part1-5061</guid>
      <description>&lt;p&gt;A lot of time there are some problems which we face occasionally but the time when that occasion become too often it becomes frustrating to keep searching those occasional problem here and there on stack overflow or documentation of the libraries. So I'm starting this series of Problems and Solutions to have my those problems all curated at one place. Let's see how it goes. Some of these problems took me to get through a lot of stack overflow answers to find the right one. I wish it saves someone's time.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. How to change port for NPM start? or Node JS change server port?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="kd"&gt;SET&lt;/span&gt; &lt;span class="kd"&gt;PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;8080&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="kd"&gt;npm&lt;/span&gt; &lt;span class="nb"&gt;start&lt;/span&gt; //windows
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;4000&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="kd"&gt;npm&lt;/span&gt; &lt;span class="nb"&gt;start&lt;/span&gt; //MAC
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. How to find difference between 2 dates in days?
&lt;/h3&gt;

&lt;p&gt;Let's say we have two dates, your date of birth and today's date and you want to &lt;strong&gt;find the difference&lt;/strong&gt; between them in days. It's something I feel someone will someday &lt;strong&gt;definitely need to use&lt;/strong&gt;. So &lt;a href="https://dev.to/atulbhattsystem32/find-no-of-days-between-2-dates-using-momentjs-53pc"&gt;here's&lt;/a&gt; the way to do it.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Some Quick Generic Web-Developer Friendly Shortcuts
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Clear Console logs&lt;/strong&gt; - &lt;em&gt;developer tools (ctrl+l)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Close Tabs&lt;/strong&gt; - &lt;em&gt;(ctrl+w)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Duplicate a Tab&lt;/strong&gt; - &lt;em&gt;(ctrl+shift+k)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open recently closed tabs&lt;/strong&gt; - &lt;em&gt;(ctrl+shift+t)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hard Reload&lt;/strong&gt; - &lt;em&gt;(ctrl+shift+r)&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. NVM- Node Version Manager ( Windows)
&lt;/h3&gt;

&lt;p&gt;If you're a JS developer then you have had or will at later point in time face the &lt;strong&gt;need to change the node version&lt;/strong&gt; installed in your system because the &lt;strong&gt;project doesn't supports&lt;/strong&gt; the latest. Here NVM - Node Version Manager comes to your rescue.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It allows you to have &lt;code&gt;multiple Node Versions&lt;/code&gt; installed and toggle between them.&lt;br&gt;
&lt;a href="https://github.com/coreybutler/nvm-windows" rel="noopener noreferrer"&gt;NVM-windows&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  5. Copy as CURL
&lt;/h3&gt;

&lt;p&gt;When you're frontend developer you often need to &lt;strong&gt;integrate APIs.&lt;/strong&gt; And a lot of time there might be &lt;strong&gt;issues&lt;/strong&gt; which you would've have to &lt;strong&gt;communicate&lt;/strong&gt; to the &lt;strong&gt;backend developer&lt;/strong&gt; who will be needing things like the &lt;strong&gt;payload and header&lt;/strong&gt; you sent with the api to** check** you passed everything correctly.&lt;br&gt;
Instead, what you can do is &lt;strong&gt;send the CURL url&lt;/strong&gt; to your backend developer which he can import in his &lt;strong&gt;API test tool like POSTMAN&lt;/strong&gt; to check it.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;These are few for now and I'll keep coming with more soon. Till then fast solving😁.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://klickspell.com/blog/useful-tips-for-web-dev-part1-5061" rel="noopener noreferrer"&gt;Klickspell Engineering&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>tooling</category>
    </item>
    <item>
      <title>Not 5 but 6 Things to ask Before Joining a new Organisation If you're a DEV or SDE.</title>
      <dc:creator>Atul Bhatt</dc:creator>
      <pubDate>Wed, 27 Apr 2022 05:39:01 +0000</pubDate>
      <link>https://dev.to/atulbhattsystem32/not-5-but-6-things-to-ask-before-joining-a-new-organisation-if-youre-a-dev-or-sde-2a99</link>
      <guid>https://dev.to/atulbhattsystem32/not-5-but-6-things-to-ask-before-joining-a-new-organisation-if-youre-a-dev-or-sde-2a99</guid>
      <description>&lt;p&gt;Often there comes a time when you've to face a situation to change your job. And there can be many reasons for that ranging from a high salary to work-life balance and many more.&lt;/p&gt;

&lt;p&gt;So in this post I'll share some points that you can create a comparison table in order to decide which one to join and which one not.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Salary
&lt;/h3&gt;

&lt;p&gt;Salary directly equates to money you'll earn. And you can say it's &lt;strong&gt;materialistic&lt;/strong&gt; and we should not chase it. But but but...&lt;strong&gt;there's a catch&lt;/strong&gt;.&lt;br&gt;
You salary determines &lt;strong&gt;the worth of your time&lt;/strong&gt;. It tells how much value you get for your time that you put in in your job.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Salary breakdown is also an important factor to check. Are you getting full amount in hand or there's a PF system. Because you can be a person like me who would like to have full money in hand and manage your money yourself instead of letting it be deprecated by inflation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  2. Job Location
&lt;/h3&gt;

&lt;p&gt;Job location also plays a huge role when making career related decision. Location is very important as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you've to relocate to a new location and it's far it can be a pain to do so.&lt;/li&gt;
&lt;li&gt;If the location is an &lt;strong&gt;expensive place&lt;/strong&gt; then the salary you thought was high would actually look less in the end after all the expenditure.&lt;/li&gt;
&lt;li&gt;Some people prefer to be around their family so now with the option to either do &lt;strong&gt;WFH or WFO or maybe Hybrid&lt;/strong&gt; is now a choice based on location.&lt;/li&gt;
&lt;li&gt;Job location also determines what kind of place or people you would like to be around. You can be working in a city which is &lt;strong&gt;IT Hub or a city which has good food&lt;/strong&gt;, or maybe the mix of both world if you're that much lucky. So an awareness about the kind of &lt;strong&gt;lifestyle you want&lt;/strong&gt; to have is must to make this choice.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Increment Structure
&lt;/h3&gt;

&lt;p&gt;Increments are important to &lt;strong&gt;keep you motivated&lt;/strong&gt; and hooked to the sense of &lt;strong&gt;making progress monetarily&lt;/strong&gt; in your career. Therefore, it's always good to know how often increments are made, it's criteria, and what are the &lt;strong&gt;percentage ranges&lt;/strong&gt; for the increment.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Bonuses
&lt;/h3&gt;

&lt;p&gt;Adding to the increment there're &lt;strong&gt;annual bonuses&lt;/strong&gt; and different other kinds of bonuses. So ask about the bonuses. They kind of add up to your annual income and hence boost your CTC.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Let's say you earn 12LPA and there are 10% annual bonus, then after completing a year you get 1Lakh and that kind of sums upto 13LPA.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  5. Employee Friendly Policies and other
&lt;/h3&gt;

&lt;p&gt;These are some minor things but plays a significant role in how easy it would be to carry on doing your job even if you love the job you do.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What are the leave policies? &lt;strong&gt;Number of leaves&lt;/strong&gt; - paid leaves, sick leaves, etc. I even saw the option of &lt;strong&gt;unlimited leaves&lt;/strong&gt;. Currently I don't know how it works but I'll update here once I do.&lt;/li&gt;
&lt;li&gt;How flexible are timings? Do you need to &lt;strong&gt;pretend busy&lt;/strong&gt; even if you're not?&lt;/li&gt;
&lt;li&gt;Are there any coverage for &lt;strong&gt;health&lt;/strong&gt; insurance or medical expenses?&lt;/li&gt;
&lt;li&gt;Any &lt;strong&gt;upskilling&lt;/strong&gt; model such as providing courses for online learning and other things?&lt;/li&gt;
&lt;li&gt;Does the company provides you with the &lt;strong&gt;machine to work&lt;/strong&gt; on or you've to use your own. Kinda sounds weird but there are some who ask you to use your own.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6. Bond and Notice Period
&lt;/h3&gt;

&lt;p&gt;Firstly I would suggest that if you've &lt;strong&gt;multiple job offers&lt;/strong&gt; in your hand refrain from bonds. &lt;strong&gt;Bonds are like handcuffs tied behind your hand.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I understand the role of bonds from the perspective of employer also as hiring is a cumbersome process so they won't want the hired employees to leave the place in early phase.&lt;/p&gt;

&lt;p&gt;But what I also believe is that there's no good to keep someone who is not interested to be in the organisation as if they will only create a ripple effect of their negativity related to the organisation all around them inflicting their colleagues with it.&lt;br&gt;
And Notice periods are also important I agree but make sure you don't sign off for more than 1 to 1.5 months.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;code&gt;I know a lot of these were obvious things but believe me they don't come to mind when you need them the most like the list of things we need to keep while traveling.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;You feel me right?&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;I guess that's all for now. Comment down what you folks feel is also important to look before choosing a job. Till then happy hunting🙂.&lt;/code&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://klickspell.com/blog/not-5-but-6-things-to-ask-before-joining-a-new-organisation-if-youre-a-dev-or-sde-2a99" rel="noopener noreferrer"&gt;Klickspell Engineering&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>discuss</category>
      <category>career</category>
      <category>watercooler</category>
    </item>
    <item>
      <title>10 Cool Tech Portfolios</title>
      <dc:creator>Atul Bhatt</dc:creator>
      <pubDate>Wed, 30 Mar 2022 04:30:19 +0000</pubDate>
      <link>https://dev.to/atulbhattsystem32/10-cool-tech-portfolios-21b4</link>
      <guid>https://dev.to/atulbhattsystem32/10-cool-tech-portfolios-21b4</guid>
      <description>&lt;p&gt;There are many reasons that one should create their own tech Portfolios if they are a developer. The number one reason being - &lt;strong&gt;Proof of Work&lt;/strong&gt;. So here in this post I'm going to list &lt;strong&gt;&lt;em&gt;10 Cool Tech Portfolios&lt;/em&gt;&lt;/strong&gt; that I filtered out of many portfolios that are &lt;strong&gt;different, unique and awesome&lt;/strong&gt; in their own way.&lt;br&gt;
These portfolios can be an inspiration for your tech portfolio. So let's jump in.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;em&gt;The screenshots are just for reference. They don't depict the actual hardwork and creativity of the portfolios demonstrated through - &lt;strong&gt;animations, loaders, fonts, transitions.&lt;/strong&gt; Also these portfolios are not ranked!&lt;br&gt;
Do check out these portfolios and comment down your best picks. Also, if you have a tech portfolio put that also down in the comment section.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.ayushsingh.net/" rel="noopener noreferrer"&gt;Ayush Singh&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqznbmxym48k6zxrtq2v5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqznbmxym48k6zxrtq2v5.png" alt="Ayush Portfolio" width="799" height="391"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://mayurbavisiya.github.io/" rel="noopener noreferrer"&gt;Mayur Patel&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjmlyukik3571pgteodo2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjmlyukik3571pgteodo2.png" alt="Mayur Portfolio" width="800" height="497"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://terance.vercel.app/" rel="noopener noreferrer"&gt;Terance&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyfxfdgo17por9nq10ljz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyfxfdgo17por9nq10ljz.png" alt="Terance Portfolio" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://sumit-job.vercel.app/" rel="noopener noreferrer"&gt;Sumit Dey&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8xrg1o6b6qdxvft6qd3g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8xrg1o6b6qdxvft6qd3g.png" alt="Sumit Portfolio" width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://medhavimb.me/" rel="noopener noreferrer"&gt;Medhavi Basera&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdp02kso0qow64er2gvp9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdp02kso0qow64er2gvp9.png" alt="Medhavimb Portfolio" width="799" height="426"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://saurabhgupta.netlify.app/" rel="noopener noreferrer"&gt;Saurabh Gupta &lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8rb7napl6efq8ztkknbx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8rb7napl6efq8ztkknbx.png" alt="Saurabh Portfolio" width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://oswalgopal.github.io/" rel="noopener noreferrer"&gt;Gopal Oswal&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffdsc1vsok1cgge8o6sb7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffdsc1vsok1cgge8o6sb7.png" alt="Gopal Portfolio" width="799" height="441"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://hshekhar.com/" rel="noopener noreferrer"&gt;Himanshu Shekhar&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffyp90zttj4576kvr1kc5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffyp90zttj4576kvr1kc5.png" alt="Himanshu Portfolio" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://arn4b.tech/" rel="noopener noreferrer"&gt;Arnab Chatterjee&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwlzyvpn1k2t0rugdn83q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwlzyvpn1k2t0rugdn83q.png" alt="Arnab Portfolio" width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://thatcoffeeeguy.com/" rel="noopener noreferrer"&gt;Adhithya |that_coffeee_guy&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk7jb9ldyr038af7ok2uf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk7jb9ldyr038af7ok2uf.png" alt="Adhitya Portfolio" width="799" height="423"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;I'm also looking more inspirations for creating my tech portfolio. So if you've a tech portfolio do not hesitate to comment that down. As always thank you for spending your time reading my posts.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Have an inspirational day :)&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://klickspell.com/blog/10-cool-tech-portfolios-21b4" rel="noopener noreferrer"&gt;Klickspell Engineering&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>beginners</category>
      <category>portfolio</category>
    </item>
    <item>
      <title>No import React from 'react'. Here's Why!</title>
      <dc:creator>Atul Bhatt</dc:creator>
      <pubDate>Tue, 29 Mar 2022 05:44:50 +0000</pubDate>
      <link>https://dev.to/atulbhattsystem32/no-import-react-from-react-heres-why-hom</link>
      <guid>https://dev.to/atulbhattsystem32/no-import-react-from-react-heres-why-hom</guid>
      <description>&lt;p&gt;&lt;em&gt;Information Source: &lt;a href="https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html" rel="noopener noreferrer"&gt;The React Docs&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So I assume if you are reading this post then &lt;strong&gt;you are probably a react developer or an aspiring react developer&lt;/strong&gt;. Doesn't matter which one you're the above question is the one that you may encounter within yourself while working with react.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Now, what triggered me to write this blog post is depicted in the screenshot below and further explained below the screenshot. Let's uncover this mystery together.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi4g31j6obexcyff3d9xu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi4g31j6obexcyff3d9xu.png" alt="VS Code Screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So as you can see the one line without which the React didn't used to work is now treated as declared but not read or in other word used.&lt;br&gt;
Yes folks, I'm talking about none other than &lt;code&gt;import React from "react";&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Perhaps something might have changed so what can be a possibility for that. &lt;strong&gt;This new warning makes sense as of now because we were always importing &lt;code&gt;React&lt;/code&gt; even if it was not required.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So as always let's divide our post into question with the first one being-&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Why do we do &lt;code&gt;import React from "react";&lt;/code&gt;?
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;As I had already assumed that you're a react developer so I also assume that you know that React uses JSX. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;However, &lt;strong&gt;the browser doesn't understands JSX&lt;/strong&gt; so it has to be converted in something that browser understand and that is JavaScript, and this &lt;strong&gt;conversion of JSX into JS was possible because of compilers like &lt;code&gt;Babel&lt;/code&gt;.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As now we've crossed 2020 already and &lt;strong&gt;React 17&lt;/strong&gt; is a thing which &lt;strong&gt;didn't introduced any new features&lt;/strong&gt; but one thing. And that's the key to answer for our question. Can you guess what??&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The support for a New Version Of JSX Transform.&lt;br&gt;
I say it again.&lt;br&gt;
The support for a New Version Of JSX Transform.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Now we have two JSX transform - Old and New obviously.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So before when we were doing:&lt;/em&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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;App&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&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;Hello World&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;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;The Old JSX transform used to do:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;App&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;h1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hello world&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;Since, JSX was compiled into &lt;code&gt;React.createElement&lt;/code&gt;, &lt;strong&gt;it was necessary for the React to be available in the scope.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Finally, one question is now answered. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  But we are actually left with the original question. What's changed in new JSX transform that made it 'okay' to not import React for the sake JSX transform.
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Now to import &lt;code&gt;React&lt;/code&gt; so that it can be in the scope and just only because &lt;code&gt;React.createElement&lt;/code&gt; can be called is not a perfect choice.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To solve this part and a few other &lt;a href="https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md#motivation" rel="noopener noreferrer"&gt;performance improvements and simplifications&lt;/a&gt; (which we are not discussing here) React collaborated with the Babel to bring the new version of JSX transform into existence.&lt;/p&gt;

&lt;p&gt;React made some changes in the React17 by &lt;strong&gt;adding two new entry points to the React package&lt;/strong&gt; just to be &lt;strong&gt;used only&lt;/strong&gt; by the &lt;strong&gt;compilers like Babel&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So now with the availability of these two new entry points that Babel uses to perform JSX transform which means &lt;strong&gt;the need to do JSX transform via React.createElement is no longer required.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And therefore folks, no need to do &lt;code&gt;import React from "react"&lt;/code&gt; any longer if you are on React version greater than 16.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;PS:&lt;/strong&gt; &lt;em&gt;If you're on older version of React such as React 16 or 15 or even 0 then there's a good news for you. React has released React 0.14.0, React 15.7.0, and React 0.14.10 for people who are still on the older major versions.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;So now all you need to use latest JSX transform is these latest version and a supported compiler like Babel.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I hope you enjoyed reading this article and was able to calm your curious mind for some time. &lt;strong&gt;Meanwhile you can checkout my other posts.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Happy transforming into a curious reader. &lt;br&gt;
Have a nice day folks.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://klickspell.com/blog/no-import-react-from-react-heres-why-hom" rel="noopener noreferrer"&gt;Klickspell Engineering&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>babel</category>
      <category>jsx</category>
    </item>
    <item>
      <title>Breaking down `npx create-react-app` from npm to npx🥷</title>
      <dc:creator>Atul Bhatt</dc:creator>
      <pubDate>Sun, 20 Feb 2022 15:05:50 +0000</pubDate>
      <link>https://dev.to/atulbhattsystem32/breaking-down-npx-create-react-app-from-npm-to-npx-4ah9</link>
      <guid>https://dev.to/atulbhattsystem32/breaking-down-npx-create-react-app-from-npm-to-npx-4ah9</guid>
      <description>&lt;p&gt;Hello🙋‍♂️ to all the curious devs🤓. Today in this post I'm going to breakdown the things that &lt;em&gt;&lt;strong&gt;npx create-react-app&lt;/strong&gt;&lt;/em&gt; does for us. I know there are many other articles for the same but as always I'm documenting👻 this firstly for me and if it proves to be useful for anyone out here reading this it would make me more than happy😸.&lt;/p&gt;

&lt;p&gt;So let's start. I'll break this down in the form of questions, and below is the first.&lt;/p&gt;

&lt;h2&gt;
  
  
  What exactly is npx?
&lt;/h2&gt;

&lt;p&gt;So all those who don't know and just kept on running the command &lt;code&gt;npx create-react-app&lt;/code&gt;, know that &lt;strong&gt;npx&lt;/strong&gt; is a &lt;strong&gt;node package runner&lt;/strong&gt;😎.&lt;/p&gt;

&lt;p&gt;Oh! that was simple. &lt;strong&gt;N&lt;/strong&gt;-node, &lt;strong&gt;P&lt;/strong&gt;-package and &lt;strong&gt;X&lt;/strong&gt;-???&lt;br&gt;
Let the &lt;strong&gt;X&lt;/strong&gt; here be from &lt;code&gt;executor&lt;/code&gt;, kind of program executor in other words program runner. So here we have it &lt;em&gt;&lt;code&gt;node package runner&lt;/code&gt;&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;We are going good😁 so far, now this article is not about npm but you might be thinking, and I mean might be thinking🤨 what is npm then?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;So, again the same way &lt;strong&gt;npm&lt;/strong&gt; is 'Node Package Manager' - &lt;strong&gt;N&lt;/strong&gt;-Node, &lt;strong&gt;P&lt;/strong&gt;-Package, &lt;strong&gt;M&lt;/strong&gt;-Manager.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now let's break down what is the role of a package manager and a package runner.🤫&lt;/p&gt;

&lt;h1&gt;
  
  
  Node Package Manager
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;npm&lt;/em&gt;&lt;/strong&gt; is a &lt;code&gt;package manager&lt;/code&gt; that helps💪 you in managing the &lt;code&gt;dependencies/packages&lt;/code&gt; you as a developer want to have in your project. &lt;/li&gt;
&lt;li&gt;It also helps you in managing🤏 whether you want to install those packages globally (for all the projects) or locally (for the current project).&lt;/li&gt;
&lt;li&gt;This all that we are talking about is a CLI (command line interface) that gets installed when you install Node JS in your system. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But &lt;strong&gt;npm&lt;/strong&gt; is more than that.🕵🏼‍♂️&lt;/p&gt;

&lt;p&gt;So when you install a package on your system it's fetched from online, and in online that place is the &lt;strong&gt;npm&lt;/strong&gt; repository.&lt;br&gt;
So &lt;strong&gt;npm&lt;/strong&gt; is a &lt;code&gt;package manager&lt;/code&gt; which is a &lt;code&gt;combination&lt;/code&gt; of a &lt;code&gt;CLI and a Repository&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;With now this sorted😼, it's time to hop back towards &lt;strong&gt;npx&lt;/strong&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So it's obvious that you installed a package and you wanna do something with it. Maybe uninstall it which you can easily do with &lt;strong&gt;npm&lt;/strong&gt; or use it by running it.&lt;/p&gt;

&lt;h2&gt;
  
  
  There's a catch
&lt;/h2&gt;

&lt;p&gt;How to run a package or in other words execute it. Can't we do with the help of &lt;strong&gt;npm&lt;/strong&gt;? And boy we can do it.&lt;/p&gt;

&lt;p&gt;So the answer to why we need &lt;strong&gt;npx&lt;/strong&gt; in the very first place is just about to be revealed.🦹‍♂️&lt;/p&gt;

&lt;h4&gt;
  
  
  How to run a package with the help of npm?
&lt;/h4&gt;

&lt;p&gt;Now, for those who are thinking "I've run a package with npm before and aren't be always starting react server with the help of the command - &lt;code&gt;npm run start&lt;/code&gt;"&lt;/p&gt;

&lt;p&gt;Yes, so if we are able to do it why in the world &lt;strong&gt;npx&lt;/strong&gt;🥴🥴???&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So the catch here is that&lt;/strong&gt; - &lt;em&gt;you can run &lt;code&gt;only those packages&lt;/code&gt; using npm run those are &lt;code&gt;specified in your projects package.json&lt;/code&gt;. And that simply means if you wanna run a npm package you gotta add that in your package.json.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9l8mg3kozl6wkkrrxa5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9l8mg3kozl6wkkrrxa5.png" alt="Package.json" width="697" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You see all those &lt;code&gt;inside scripts&lt;/code&gt;. That's the &lt;code&gt;key&lt;/code&gt; to &lt;code&gt;npm run&lt;/code&gt; for various packages. Like &lt;code&gt;format&lt;/code&gt; is for the &lt;code&gt;prettier&lt;/code&gt;.&lt;br&gt;
There are other &lt;code&gt;tedious way&lt;/code&gt; to do so, such as specifying the local path:&lt;code&gt;_ npm run ./node_modules/.bin/your-package_&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Now, there comes our hero🦸‍♂️ into the picture - NPX.
&lt;/h3&gt;

&lt;p&gt;Let's explore what &lt;strong&gt;npx&lt;/strong&gt; brings on the table🧙‍♂️ for us.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;npx easily runs Node.js based executable installed via npm.&lt;/li&gt;
&lt;li&gt;We can run a locally installed package easily, and that's what we are looking here for.&lt;/li&gt;
&lt;li&gt;There are other perks of npx but not in this article.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Do you know you can start react server with &lt;strong&gt;npx&lt;/strong&gt; also as: &lt;br&gt;
&lt;code&gt;npx react-scripts start&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  It's time for CRA (create-react-app)👩🏻‍🎨
&lt;/h2&gt;

&lt;p&gt;If you're a &lt;em&gt;&lt;strong&gt;react-dev&lt;/strong&gt;&lt;/em&gt; like me. Then you might have used this command atleast once in your life - &lt;code&gt;npx create-react-app&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now we know what &lt;strong&gt;npx&lt;/strong&gt; is and from all our discussion it's also clear that create-react-app is an executable, so let's find out what it does for us.&lt;/p&gt;

&lt;h4&gt;
  
  
  CRA is a toolchain.
&lt;/h4&gt;

&lt;p&gt;And now another term to breakdown🤦. What is a &lt;strong&gt;toolchain&lt;/strong&gt;??&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Don't worry💆 it's a simple term which holds its meaning in its name. It's a chain of tools or a &lt;code&gt;collection of distinct tools&lt;/code&gt; that &lt;code&gt;helps&lt;/code&gt; in achieving the &lt;code&gt;process of completing&lt;/code&gt; the &lt;code&gt;software development&lt;/code&gt; and sometimes &lt;code&gt;deployment&lt;/code&gt; too.&lt;/li&gt;
&lt;li&gt; So &lt;code&gt;CRA (create-react-app)&lt;/code&gt; is a &lt;code&gt;JavaScript toolchain&lt;/code&gt; or a set of software tools which are &lt;code&gt;basically CLIs&lt;/code&gt; to &lt;code&gt;help in creation of a react project&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fywlsw5ijhjcbe1croiqf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fywlsw5ijhjcbe1croiqf.png" alt="CRA APP" width="800" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  So instead of reinventing the wheel again, I would add few content from React Docs:
&lt;/h5&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A JavaScript build toolchain typically consists of:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; A &lt;code&gt;package manager&lt;/code&gt;, such as &lt;code&gt;Yarn or npm&lt;/code&gt;. It lets you take advantage of a vast ecosystem of third-party packages, and easily install or update them.&lt;/li&gt;
&lt;li&gt; A &lt;code&gt;bundler&lt;/code&gt;, such as &lt;code&gt;webpack or Parcel&lt;/code&gt;. It lets you write modular code and &lt;code&gt;bundle&lt;/code&gt; it together &lt;code&gt;into small packages&lt;/code&gt; to &lt;code&gt;optimize load time&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt; A &lt;code&gt;compiler&lt;/code&gt; such as &lt;code&gt;Babel&lt;/code&gt;. It lets you &lt;code&gt;write modern JavaScript&lt;/code&gt; code that still &lt;code&gt;works in older browsers&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;So, in short a CRA offers all these functionalities. For more info on this you can refer to &lt;a href="https://reactjs.org/docs/create-a-new-react-app.html" rel="noopener noreferrer"&gt;react docs&lt;/a&gt;.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thank you folks for reading all through this article. I tried my best to breakdown the terms that would've otherwise made you feel like you are missing some context to this.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep reading, keep learning, and never stop being curious. See you until next time.&lt;/strong&gt;✌️✌️✌️&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://klickspell.com/blog/breaking-down-npx-create-react-app-from-npm-to-npx-4ah9" rel="noopener noreferrer"&gt;Klickspell Engineering&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>npm</category>
      <category>webdev</category>
      <category>react</category>
      <category>node</category>
    </item>
    <item>
      <title>React Interview - (Part 3)</title>
      <dc:creator>Atul Bhatt</dc:creator>
      <pubDate>Sat, 22 Jan 2022 08:54:00 +0000</pubDate>
      <link>https://dev.to/atulbhattsystem32/react-interview-part-3-mmb</link>
      <guid>https://dev.to/atulbhattsystem32/react-interview-part-3-mmb</guid>
      <description>&lt;p&gt;So welcome🙂 again to another part of React Interview series. So we’re finally now into &lt;code&gt;part-3&lt;/code&gt;. Before I thought to bind up this series into total of 3 parts but there are so many questions to cover because React also includes JS. So hopefully this series will have &lt;code&gt;total 5 parts&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So let’s cut out the introductory crap and jump directly into some more React interview questions.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;1-&lt;/strong&gt; What does &lt;code&gt;useState&lt;/code&gt; return?&lt;br&gt;
&lt;strong&gt;2-&lt;/strong&gt; What’s the difference between &lt;code&gt;React Router&lt;/code&gt; and &lt;code&gt;React router DOM&lt;/code&gt;?&lt;br&gt;
&lt;strong&gt;3-&lt;/strong&gt; What are &lt;code&gt;peer dependencies&lt;/code&gt;?&lt;br&gt;
&lt;strong&gt;4-&lt;/strong&gt; Can we use &lt;code&gt;React without JSX&lt;/code&gt;?&lt;br&gt;
&lt;strong&gt;5-&lt;/strong&gt; Why do we have to use &lt;code&gt;className&lt;/code&gt; prop and can't have &lt;code&gt;class&lt;/code&gt; as a prop to a component as a CSS selector?&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  &amp;lt;div className= “react-interview”&amp;gt;
  Hi! [dev.to](http://dev.to) 
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
plaintext&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;6-&lt;/strong&gt; Explain the &lt;code&gt;Redux lifecycle&lt;/code&gt;.&lt;br&gt;
&lt;strong&gt;7-&lt;/strong&gt; What’s the output?&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;     const b = 'abc' 
     b.push(d) 
     console.log(b)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;8-&lt;/strong&gt; What are &lt;code&gt;events in JS&lt;/code&gt; and how we can play around them?&lt;br&gt;
&lt;strong&gt;9-&lt;/strong&gt; Explain the use of &lt;code&gt;useRef&lt;/code&gt;?&lt;br&gt;
&lt;strong&gt;10-&lt;/strong&gt; Difference between the &lt;code&gt;Browser Router&lt;/code&gt; and &lt;code&gt;Hash Router&lt;/code&gt;?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;I'll be wrapping up this part of the article here. I'll be glad to read you answers to these question in the comment section.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;And don't forget to mention your approach towards taking interviews. How you approach it? And I know there might be some flaws🥺 in asking these questions so you are free to point them out.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://klickspell.com/blog/react-interview-part-3-mmb" rel="noopener noreferrer"&gt;Klickspell Engineering&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>writing</category>
    </item>
    <item>
      <title>Find No of days between 2 dates using moment.js</title>
      <dc:creator>Atul Bhatt</dc:creator>
      <pubDate>Sat, 25 Dec 2021 19:00:39 +0000</pubDate>
      <link>https://dev.to/atulbhattsystem32/find-no-of-days-between-2-dates-using-momentjs-53pc</link>
      <guid>https://dev.to/atulbhattsystem32/find-no-of-days-between-2-dates-using-momentjs-53pc</guid>
      <description>&lt;p&gt;Time and time again I'm reminded that you can't escape time and so are the problems related to date and time. One such very common problem is to find the &lt;code&gt;difference between 2 dates.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Let me give you a very simple example where we will try to &lt;code&gt;find the how many days old are you?&lt;/code&gt;&lt;br&gt;
So it feels like not a such big deal but think of writing the entire logic on your own when you know you can write but it will much less of a hassle to do it via library like &lt;code&gt;moment.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I'm writing this as an article here because it took me time to find the way to do it using moment itself. I'm writing this article more for myself than for others. So consider this as a treat.&lt;/p&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Here's the code:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;myDob&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;19/12/1997&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="s2"&gt;DD/MM/YYYY&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;today&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;myAge&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;today&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;diff&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;myDob&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;years&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;noOfDays&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;today&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;diff&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;myDob&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;days&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;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Below is the embedded sandbox to demonstrate it:&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/79nux" width="100%" height="500"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Check out the same in moment docs:&lt;br&gt;
&lt;a href="https://momentjs.com/docs/#/durations/subtract/" rel="noopener noreferrer"&gt;moment&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Thanks for your time reading this. I hope it helped you. Have a productive day :)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PS:&lt;/strong&gt;&lt;em&gt;Moment is in maintenance mode.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You can read about the meaning of it in the article linked below.&lt;br&gt;
&lt;a href="https://ilikekillnerds.com/2020/09/moment-js-officially-becomes-a-legacy-project-in-maintenance-mode/" rel="noopener noreferrer"&gt;MOMENT.JS OFFICIALLY BECOMES A LEGACY PROJECT IN MAINTENANCE MODE&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://klickspell.com/blog/find-no-of-days-between-2-dates-using-momentjs-53pc" rel="noopener noreferrer"&gt;Klickspell Engineering&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>help</category>
    </item>
    <item>
      <title>React JS Interview(Part-2)</title>
      <dc:creator>Atul Bhatt</dc:creator>
      <pubDate>Thu, 23 Dec 2021 10:45:32 +0000</pubDate>
      <link>https://dev.to/atulbhattsystem32/react-js-interviewpart-2-41bm</link>
      <guid>https://dev.to/atulbhattsystem32/react-js-interviewpart-2-41bm</guid>
      <description>&lt;p&gt;So this is the &lt;code&gt;second blog post&lt;/code&gt; where I'm sharing some more important questions that you may stumble upon while giving a &lt;code&gt;React JS or just a JS interview.&lt;/code&gt; Even if you don't encounter any of these questions in your interview it will be good to check them out just for finding out how many of them you know well. Let's start.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;What is a pure function?&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;What is a HOC?&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Give some examples of HOC you have used.&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;What is render props?&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Custom Hooks?&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Difference between Custom Hooks and Functions and Component?&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Explain the working of Virtual DOM in detail.&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;What is reconciliation in react?&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;What are controlled and Uncontrolled components?&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Which one is better-controlled or uncontrolled components?&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;What is Memoization and how it can be achieved in React?&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Do you know what is a toolchain?&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;What is code splitting in React and how we can achieve it?&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;What is hoisting in JavaScript?&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;What is the difference between Array.forEach() and Array.map()?&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Explain event loop?&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Name one JS engine.&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Is Javascript Object Oriented? If not then what type it is?&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Some JS snippets to try:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;
&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;//Output: ??&lt;/span&gt;
&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="nx"&gt;Snippet2&lt;/span&gt;


&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;obj1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;atul&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
           &lt;span class="na"&gt;hobbies&lt;/span&gt;&lt;span class="p"&gt;:[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;reading books&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;writing blogs&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;exercising&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;poetry&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]}&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;obj2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;obj1&lt;/span&gt;
&lt;span class="k"&gt;delete&lt;/span&gt; &lt;span class="nx"&gt;obj2&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hobbies&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;obj2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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


&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;aa&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;543&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;56&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;cc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;atul&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;ac&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="c1"&gt;//What will happen? Is this Ok.&lt;/span&gt;
&lt;span class="nx"&gt;bb&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;
&lt;span class="nx"&gt;bb&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;
&lt;span class="nx"&gt;cc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Age&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;greater than 18&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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


&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;myself&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;atul&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;hobbies&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="s2"&gt;reading books&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="s2"&gt;writing blogs&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="s2"&gt;exercising&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="s2"&gt;poetry&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;favourites&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;movies&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="s2"&gt;Iron Man&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="s2"&gt;End Game&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="s2"&gt;Spiderman&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;Sports&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="s2"&gt;Cricket&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="s2"&gt;Football&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="s2"&gt;Basketball&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="s2"&gt;Badminton&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;song&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="s2"&gt;Legends Never Die&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="s2"&gt;Chidiya: Vilen&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="s2"&gt;etc&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="s2"&gt;etc...&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;yourself&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;myself&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="nx"&gt;yourself&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hobbies&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Guitar playing&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="s2"&gt;playing football&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="s2"&gt;Dancing&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;newSelf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;myself&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="nx"&gt;newSelf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;favourites&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;movies&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Star Wars&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="s2"&gt;Ice Age&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="s2"&gt;Batman&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="s2"&gt;Flash&lt;/span&gt;&lt;span class="dl"&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;myself:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;myself&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="s2"&gt;yourself:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;yourself&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="s2"&gt;newself&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;newSelf&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Here is link to all the questions asked above with implementation, so that you don't feel slacking off with what will happen in each case.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;


&lt;div class="ltag__replit"&gt;
  &lt;iframe height="550px" src="https://replit.com/@AtulBhatt/JSInterview2?embed=true"&gt;&lt;/iframe&gt;
&lt;/div&gt;



&lt;p&gt;&lt;code&gt;I will be ending this article here for now. I'll continue it in the next part with more questions that will cover more in-depth questions. So see you around here next time.👋&lt;br&gt;
Have an insightful day 😄.&lt;/code&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://klickspell.com/blog/react-js-interviewpart-2-41bm" rel="noopener noreferrer"&gt;Klickspell Engineering&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>interview</category>
      <category>webdev</category>
    </item>
    <item>
      <title>5 Frequently used JS libraries for React</title>
      <dc:creator>Atul Bhatt</dc:creator>
      <pubDate>Wed, 15 Dec 2021 10:34:46 +0000</pubDate>
      <link>https://dev.to/atulbhattsystem32/5-frequently-used-js-libraries-for-react-16g</link>
      <guid>https://dev.to/atulbhattsystem32/5-frequently-used-js-libraries-for-react-16g</guid>
      <description>&lt;p&gt;I've seen many interns that join my company who have just basic knowledge of JS and are starting to dive into a UI library like React &lt;code&gt;struggling with what to learn ahead to fasten there development journey&lt;/code&gt;. While there are lot of things you can learn from the internet to proceed further in your Web Development journey through React JS but I believe there are &lt;code&gt;some JS libraries that you should immediately start practicing&lt;/code&gt; and get a grasp on. This is something I've felt after working on multiple React projects.&lt;/p&gt;

&lt;p&gt;So without further adieu let's start with our list. This list is biased towards React so please take this list with a grain of salt.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;1. Moment&lt;/strong&gt; (&lt;a href="https://momentjs.com/" rel="noopener noreferrer"&gt;https://momentjs.com/&lt;/a&gt;)
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;One thing that always seize to exist is time. One day or another day you'll definitely get a data that'll require you to deal with time. So moment is the library that's a must to learn. The library is easy and offers a lot of methods to manipulate date and time.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;2. Axios&lt;/strong&gt; (&lt;a href="https://axios-http.com/docs/intro" rel="noopener noreferrer"&gt;https://axios-http.com/docs/intro&lt;/a&gt;)
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;Axios is a simple promise based HTTP client for the browser and node.js. In simple words, Axios is a library that you use to perform API callings. Axios reduces the pain of API calling by providing features like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make XMLHttpRequests from the browser&lt;/li&gt;
&lt;li&gt;Make http requests from node.js&lt;/li&gt;
&lt;li&gt;Supports the Promise API&lt;/li&gt;
&lt;li&gt;Intercept request and response&lt;/li&gt;
&lt;li&gt;Transform request and response data&lt;/li&gt;
&lt;li&gt;Cancel requests&lt;/li&gt;
&lt;li&gt;Automatic transforms for JSON data&lt;/li&gt;
&lt;li&gt;Client side support for protecting against XSRF&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;3. Material-UI&lt;/strong&gt; (&lt;a href="https://mui.com/" rel="noopener noreferrer"&gt;https://mui.com/&lt;/a&gt;)
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;There always comes a time when you have to dive into a UI library to get prebuilt components to fasten your development. And the most common UI library I've encountered in various projects I've worked on is material-ui. Apart from material-ui you can also look into core-ui.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;4. React-toastify&lt;/strong&gt; (&lt;a href="https://fkhadra.github.io/react-toastify/introduction" rel="noopener noreferrer"&gt;react-toastify/introduction&lt;/a&gt;)
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;React toastify says it's usage all with its name. It's quite useful for displaying toast messages to update user on events like successful login, signup, and rest is upto your usage and imagination where you feel it can fit your usage.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;5. Formik&lt;/strong&gt; (&lt;a href="https://formik.org/" rel="noopener noreferrer"&gt;https://formik.org/&lt;/a&gt;)
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;A web project without dealing with form feels so much incomplete. I don't intend to say that a project without form is not a project but here and there forms will be there. When it comes to dealing with form the other things that will definitely hop on are from fields validations.&lt;br&gt;
Formik is a small library that helps you with the 3 most annoying parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Getting values in and out of form state&lt;/li&gt;
&lt;li&gt;Validation and error messages&lt;/li&gt;
&lt;li&gt;Handling form submission&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;I would like to keep this post short and would like to hear more about your top 5 picks. Of course there are other libraries which totally deserve to be in this list such as &lt;code&gt;redux, core-ui, react-bootstrap, font-awesome,&lt;/code&gt; and many more. But let's keep them preserved for some other time. I'm really excited to know about your top picks from the comments.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thanks for your time reading. Have a informatic day.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://klickspell.com/blog/5-frequently-used-js-libraries-for-react-16g" rel="noopener noreferrer"&gt;Klickspell Engineering&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>react</category>
    </item>
  </channel>
</rss>
