<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anjusha K on Medium]]></title>
        <description><![CDATA[Stories by Anjusha K on Medium]]></description>
        <link>https://medium.com/@anjusha.khandavalli?source=rss-8cea92ad3a51------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1qJEYa-0tUVKCJkYrsvTqA.jpeg</url>
            <title>Stories by Anjusha K on Medium</title>
            <link>https://medium.com/@anjusha.khandavalli?source=rss-8cea92ad3a51------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 12:54:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anjusha.khandavalli/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The One-Liner for Pulling a Folder Full of Git Repos (and the Two Traps That Get Everyone)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@anjusha.khandavalli/the-one-liner-for-pulling-a-folder-full-of-git-repos-and-the-two-traps-that-get-everyone-071585628023?source=rss-8cea92ad3a51------2"><img src="https://cdn-images-1.medium.com/max/2600/1*YonDhUzFjtbHhtM56Az2QA.png" width="2752"></a></p><p class="medium-feed-snippet">If you work across a bunch of microservices, you probably have a folder that looks like this:</p><p class="medium-feed-link"><a href="https://medium.com/@anjusha.khandavalli/the-one-liner-for-pulling-a-folder-full-of-git-repos-and-the-two-traps-that-get-everyone-071585628023?source=rss-8cea92ad3a51------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@anjusha.khandavalli/the-one-liner-for-pulling-a-folder-full-of-git-repos-and-the-two-traps-that-get-everyone-071585628023?source=rss-8cea92ad3a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/071585628023</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Anjusha K]]></dc:creator>
            <pubDate>Thu, 30 Jul 2026 01:01:16 GMT</pubDate>
            <atom:updated>2026-07-30T01:02:04.952Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Merge vs Rebase: The Git Decision You’ve Been Avoiding]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Merge and rebase do two very different things to your commit history, and picking the wrong one on a shared branch can wreck everyone&#x2019;s&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@anjusha.khandavalli/merge-vs-rebase-the-git-decision-youve-been-avoiding-15090384c980?source=rss-8cea92ad3a51------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@anjusha.khandavalli/merge-vs-rebase-the-git-decision-youve-been-avoiding-15090384c980?source=rss-8cea92ad3a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/15090384c980</guid>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Anjusha K]]></dc:creator>
            <pubDate>Thu, 18 Jun 2026 07:55:50 GMT</pubDate>
            <atom:updated>2026-06-18T07:56:59.193Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Flexbox, Part 1: Center Anything(And finally understand why it works)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@anjusha.khandavalli/flexbox-part-1-center-anything-and-finally-understand-why-it-works-bd343cbae45c?source=rss-8cea92ad3a51------2"><img src="https://cdn-images-1.medium.com/max/1024/1*90B94dz-po6aTb1VNA3Wbw.jpeg" width="1024"></a></p><p class="medium-feed-snippet">Part 1 of a short series that takes you from copy-pasting Flexbox to actually understanding it. Each part is a 2-minute read and builds on&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@anjusha.khandavalli/flexbox-part-1-center-anything-and-finally-understand-why-it-works-bd343cbae45c?source=rss-8cea92ad3a51------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@anjusha.khandavalli/flexbox-part-1-center-anything-and-finally-understand-why-it-works-bd343cbae45c?source=rss-8cea92ad3a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd343cbae45c</guid>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[flexbox]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Anjusha K]]></dc:creator>
            <pubDate>Tue, 16 Jun 2026 01:25:37 GMT</pubDate>
            <atom:updated>2026-06-16T01:27:26.389Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Do you know useEffect runs twice in dev mode on react 18+ versions?]]></title>
            <link>https://medium.com/@anjusha.khandavalli/do-you-know-useeffect-runs-twice-in-dev-mode-on-react-18-versions-5cb93c17a6ac?source=rss-8cea92ad3a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/5cb93c17a6ac</guid>
            <category><![CDATA[react-tips]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react-hook]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Anjusha K]]></dc:creator>
            <pubDate>Mon, 15 Jun 2026 09:18:01 GMT</pubDate>
            <atom:updated>2026-06-15T09:18:01.830Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever added a console.log inside a useEffect and noticed it prints twice? You check the dependency array, everything looks fine — but it keeps firing twice. You didn&#39;t break anything. React is doing it on purpose.</p><h4>It’s Strict Mode</h4><p>If your app is wrapped in &lt;React.StrictMode&gt; — which it is by default in Create React App, Next.js, and most modern setups — React 18+ deliberately mounts, unmounts, and remounts your component in development. Strict Mode has been around since React 16.3, but it&#39;s from React 18+ that it added the full unmount step in between — which is why we are noticing it more now.</p><p>Just in dev. Not in production.</p><p>The idea is to catch effects that don’t clean up properly. React is basically simulating what happens when a user navigates away and comes back — so if something is off, you’d rather see it in dev than in production with this.</p><h4>What it looks like</h4><pre>useEffect(() =&gt; {<br>  console.log(&quot;effect ran&quot;);<br><br>  return () =&gt; {<br>    console.log(&quot;cleanup ran&quot;);<br>  };<br>}, []);</pre><p>In dev, your console shows:</p><pre>effect ran<br>cleanup ran<br>effect ran</pre><p>In production? Just one &quot;effect ran&quot;. That&#39;s it.</p><h3>The takeaway</h3><p>Strict Mode runs your useEffect twice in dev so your effects are ready to handle being mounted more than once — and that&#39;s actually a good thing. So next time you see that double log, you know exactly what&#39;s going on 🎉.</p><p>I keep writing about these small React quirks that trip people up — follow along so you don’t miss the next one 🤗.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5cb93c17a6ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Where Does This Data Go?”]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@anjusha.khandavalli/where-does-this-data-go-9c87b4c212ba?source=rss-8cea92ad3a51------2"><img src="https://cdn-images-1.medium.com/max/2600/1*h-bvKu_keNSveo9qVeX63A.png" width="2816"></a></p><p class="medium-feed-snippet">Not a medium member? No Problem. Read free here.</p><p class="medium-feed-link"><a href="https://medium.com/@anjusha.khandavalli/where-does-this-data-go-9c87b4c212ba?source=rss-8cea92ad3a51------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@anjusha.khandavalli/where-does-this-data-go-9c87b4c212ba?source=rss-8cea92ad3a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c87b4c212ba</guid>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nextjs]]></category>
            <dc:creator><![CDATA[Anjusha K]]></dc:creator>
            <pubDate>Sat, 13 Jun 2026 06:11:48 GMT</pubDate>
            <atom:updated>2026-06-16T00:10:12.880Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[What Really Happens When You Click ‘Login’? A Journey Through Modern Web Authentication]]></title>
            <link>https://medium.com/@anjusha.khandavalli/what-really-happens-when-you-click-login-a-journey-through-modern-web-authentication-7f3648cb23e8?source=rss-8cea92ad3a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f3648cb23e8</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[frontend]]></category>
            <dc:creator><![CDATA[Anjusha K]]></dc:creator>
            <pubDate>Sun, 29 Jun 2025 01:01:35 GMT</pubDate>
            <atom:updated>2025-06-29T01:01:35.165Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Ever wondered what happens in those few milliseconds between clicking “Login” and seeing your dashboard? Let’s pull back the curtain on one of the web’s most crucial processes.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*04ssOdr9vv5y15mLZ6b56A.png" /></figure><h3>The Problem: Trust in a Trustless World</h3><p>Imagine you’re at an exclusive club. You show your ID at the door, get a special wristband, and now you can order drinks, access VIP areas, and use facilities throughout the night. The bartender doesn’t need to call the front desk every time — your wristband is proof enough.</p><p>This is exactly how modern web authentication works, except instead of a wristband, you get something called a JWT (JSON Web Token). And just like that club wristband, it tells every part of the application who you are and what you’re allowed to do.</p><p>But here’s where it gets interesting: unlike a physical wristband, this digital “proof” travels through the internet, can be copied, and contains information that hackers would love to get their hands on. So how do we make it secure?</p><h3>Act 1: The Login Dance</h3><p>Let’s say you’re using a travel booking platform like Airbnb. You enter your email and password, hit “Login,” and magic happens.</p><p><strong>Behind the scenes</strong>, your credentials take a journey to the server. The server doesn’t just check if your password is correct — it performs a complex verification dance:</p><ol><li><strong>Identity Verification</strong>: “Is this really John Doe?”</li><li><strong>Permission Assessment</strong>: “What is John allowed to do?”</li><li><strong>Token Creation</strong>: “Let me create a digital passport for John”</li></ol><p>The server creates a special token — think of it as a digital passport with three sections:</p><ul><li><strong>The Header</strong>: “This is a JWT token, signed with our secret algorithm”</li><li><strong>The Payload</strong>: “This belongs to John Doe, he’s an admin, and this expires in 24 hours”</li><li><strong>The Signature</strong>: “Signed and sealed by our server — tamper-proof guaranteed”</li></ul><p>Here’s the clever part: all this information is packed into a single string that looks like gibberish to humans but contains everything the server needs to know about you.</p><h3>Act 2: The Token’s Journey</h3><p>Now you want to do something important — let’s say add a new team member to your company account. Your browser automatically includes your JWT token with this request, like showing your ID badge before entering a restricted area.</p><p><strong>The token travels through the internet</strong>, bouncing between servers, crossing network boundaries, and eventually landing at the destination server. At each step, it’s carrying your digital identity.</p><p>But here’s what makes this remarkable: the server receiving your request has never seen you before. It doesn’t know you logged in 30 minutes ago. It doesn’t have any record of your session. Yet, within milliseconds, it can:</p><ul><li>Verify you are who you claim to be</li><li>Confirm your token hasn’t been tampered with</li><li>Check if you have permission for this action</li><li>Validate that your session hasn’t expired</li></ul><p>How? Through the magic of cryptographic signatures.</p><h3>Act 3: The Verification Ritual</h3><p>When your token arrives at the server, something fascinating happens. The server performs what I like to call “the verification ritual” — a series of cryptographic checks that would make a detective proud.</p><p><strong>First, the authenticity check</strong>: The server takes the token apart and recreates the signature using its secret key. If the signature matches, the token is authentic. If it doesn’t, someone has been tampering with your digital passport.</p><p><strong>Then, the freshness check</strong>: The server examines the expiration time embedded in the token. Like checking if your driver’s license is still valid, it ensures your session hasn’t expired.</p><p><strong>Finally, the permission check</strong>: The server looks at your role and permissions. Just because you’re authenticated doesn’t mean you can do anything — you still need the right authorization.</p><p>All of this happens in milliseconds, and if everything checks out, your request proceeds. If not, you get the digital equivalent of a bouncer saying, “Sorry, you can’t come in.”</p><h3>The Plot Twist: What Could Go Wrong?</h3><p>This system seems bulletproof, but like any good story, there are potential plot twists:</p><p><strong>The Stolen Passport Scenario</strong>: If someone steals your JWT token (like pickpocketing your wallet), they can impersonate you until the token expires. This is why tokens have short lifespans and why storing them securely matters.</p><p><strong>The Expired ID Problem</strong>: Tokens have expiration dates for security. But what happens when your token expires while you’re in the middle of booking that perfect vacation rental? Modern apps handle this gracefully with “refresh tokens” — think of them as getting a new passport while traveling.</p><p><strong>The Trust Fall</strong>: The entire system relies on keeping the server’s secret key… well, secret. If that key is compromised, it’s like having the master key to every lock in the building.</p><h3>Why This Matters to You</h3><p>You might be thinking, “This is all very technical, but why should I care?” Here’s why this affects your daily digital life:</p><p><strong>Speed</strong>: This system is why modern apps feel instant. No waiting for the server to look up your session in a database every time you click something.</p><p><strong>Security</strong>: Understanding this helps you make better decisions about which apps to trust and how to protect your accounts.</p><p><strong>Privacy</strong>: That token traveling with your requests contains information about you. Knowing what’s in it helps you understand what data you’re sharing.</p><p><strong>Reliability</strong>: This is why you can close your browser, come back later, and still be logged in (until the token expires).</p><h3>The Modern Web’s Foundation</h3><p>What we’ve just explored isn’t just one app’s authentication system — it’s the foundation of the modern internet. Every time you:</p><ul><li>Check your bank balance</li><li>Post on social media</li><li>Order food delivery</li><li>Access your work files</li><li>Shop online</li></ul><p>This same dance of tokens, verification, and authorization is happening behind the scenes.</p><p>The beauty of JWT authentication lies in its simplicity and elegance. It solved a fundamental problem of the internet: how to maintain trust and identity across stateless connections. No central session storage, no constant database lookups, no complex coordination between servers.</p><p>Just a cryptographically signed token that carries everything needed to verify your identity and permissions.</p><h3>The Takeaway</h3><p>The next time you effortlessly navigate through your favorite app, remember the sophisticated security dance happening with every click. That simple login created a chain of trust that follows you throughout your session, protecting both you and the service you’re using.</p><p>In a world where digital identity is increasingly important, understanding how these systems work isn’t just for developers — it’s digital literacy for everyone navigating our connected world.</p><p>Your login isn’t just entering credentials; it’s the beginning of a carefully choreographed security performance that keeps the modern internet running safely and smoothly.</p><p><em>Next time someone asks you what happens when you log in, you can smile and say: “It’s like getting a tamper-proof digital passport that proves who I am without the server having to remember meeting me before.”</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f3648cb23e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Backend Delays Won’t Stop You! Override Network Requests in DevTools]]></title>
            <link>https://medium.com/@anjusha.khandavalli/backend-delays-wont-stop-you-override-network-requests-in-devtools-6c245b756965?source=rss-8cea92ad3a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c245b756965</guid>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[debugging]]></category>
            <dc:creator><![CDATA[Anjusha K]]></dc:creator>
            <pubDate>Thu, 13 Feb 2025 04:18:59 GMT</pubDate>
            <atom:updated>2025-02-13T04:19:50.963Z</atom:updated>
            <content:encoded><![CDATA[<p>As frontend developers, we often encounter scenarios where the backend is incomplete or unavailable, yet we need to proceed with UI development. In such cases, Google Chrome Developer Tools (DevTools) provides a powerful feature to override network request responses. This allows us to mock API responses without modifying backend code, making frontend development smoother and more efficient.</p><h4>Why Network Request Overrides Are a Developer’s Best Friend</h4><ul><li><strong>No more waiting for backend development:</strong> Build and test UI components without dependency on backend readiness.</li><li><strong>Simulate any scenario:</strong> Quickly test different API responses, from success to failure and edge cases.</li><li><strong>Work around restrictions:</strong> Overcome CORS issues and access mock data effortlessly.</li><li><strong>Debug smarter, not harder:</strong> Modify responses in real time to troubleshoot UI behavior efficiently.</li></ul><h3>How to Override Network Responses in Chrome DevTools</h3><p>By leveraging Chrome DevTools, you can override network requests and test your frontend independently. Here’s how to set it up:</p><h4>Step 1: Enable Overrides in Chrome DevTools</h4><ol><li>Open Chrome and navigate to the webpage where you want to override the API response.</li><li>Open DevTools by pressing F12 or Ctrl + Shift + I (Cmd + Option + I on macOS) or right click and select Inspect.</li><li>Go to the <strong>Sources</strong> tab.</li><li>Open the <strong>Overrides</strong> section. If it’s not visible, enable it via the gear icon → Overrides.</li><li>Click <strong>+ Select folder for overrides</strong> and choose a local folder to store override files.</li><li>Grant Chrome permission to access this folder.</li></ol><h4>Step 2: Override the Network Response</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XMEx1XNsL1_wC734-oM8wQ.png" /></figure><ol><li>Go to the <strong>Network</strong> tab and select the API request you want to override.</li><li>Right-click on the request and select <strong>Override content</strong>.</li><li>This will create an override file inside the <strong>Overrides</strong> folder with the existing response copied.</li><li>Edit the file with your desired changes</li><li>Save the file to apply the changes.</li></ol><h4>Step 3: Reload and Test</h4><ol><li>Refresh the page.</li><li>The modified response will be served instead of the actual network request.</li><li>Test your UI to ensure it functions correctly with the mocked API response.</li></ol><h3>Conclusion</h3><p>Using Chrome DevTools to override network requests is a game-changer for frontend developers. It enables seamless UI development, even when backend services are incomplete or undergoing changes. This approach not only improves productivity but also enhances testing capabilities without needing backend involvement. Give it a try in your next project and see how much time it saves!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c245b756965" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Key features of ES14(ECMAScript 2023)]]></title>
            <link>https://medium.com/@anjusha.khandavalli/key-features-of-es14-ecmascript-2023-80152847512b?source=rss-8cea92ad3a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/80152847512b</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Anjusha K]]></dc:creator>
            <pubDate>Thu, 01 Aug 2024 06:35:48 GMT</pubDate>
            <atom:updated>2024-08-01T06:35:48.098Z</atom:updated>
            <content:encoded><![CDATA[<p>ECMAScript 2023(ES14) introduces several new features and enhancements to the javascript language, making it more powerful, efficient, and easier to work with for developers. In this blog, we’ll explore some of the key features introduced in ES14.</p><h4>Array findLast and findLastIndex</h4><p>ES14 introduces two array methods: findLast and findLastIndex . These methods are similar to find and findIndex , but they search the array from the end instead of the beginning.</p><p>Example:</p><pre>const array = [1, 2, 3, 4, 5, 6];<br><br>const lastEven = array.findLast(x =&gt; x % 2 === 0);<br>console.log(lastEven); // 6<br><br>const lastEvenIndex = array.findLastIndex(x =&gt; x % 2 === 0);<br>console.log(lastEvenIndex); // 5</pre><p>These methods provide more flexibility when working with arrays, especially when you need to find the last occurrence of an element that meets a specific condition.</p><h4>Hashbang #!</h4><p>The Hashbang #! syntax, commonly used in scripts to specify the path to the interpreter, is now officially supported in Javascript. This feature allows Javascript files to be run directly from the command line without explicitly specifying the interpreter.</p><pre>#!/usr/bin/env node<br><br>console.log(&quot;Hello, World!&quot;);</pre><p>This makes it easier to write and execute scripts directly from the command line.</p><h4><strong>Top-Level await</strong></h4><p>The introduction of top-level await in ES14 allows developers to use the await keyword at the top level of a module, simplifying asynchronous code by eliminating the need to wrap it inside an asynchronous function.</p><pre>// Before ES14<br>async function loadData() {<br>    const response = await fetch(&#39;https://api.example.com/data&#39;);<br>    const data = await response.json();<br>    console.log(data);<br>}<br>loadData();<br><br>// With ES14<br>const response = await fetch(&#39;https://api.example.com/data&#39;);<br>const data = await response.json();<br>console.log(data);</pre><p>Top-level await offers a streamlined way to handle asynchronous operations at the module level, improving readability by reducing boilerplate code and enabling a more linear and natural flow of asynchronous tasks. However, in more complex applications, using named functions can still provide clarity and better organization. The choice between using top-level await or encapsulating logic in functions depends on the specific use case and the complexity of the codebase.</p><h4><strong>Change Array by copy</strong></h4><p>The “Change Array by Copy” feature introduced in ES14 brings several new methods that allow developers to perform array manipulations without mutating the original array. This approach aligns with functional programming principles and improves code predictability and safety. Here’s a breakdown of how this feature differs from previous versions of JavaScript:</p><p><strong>Previous Version (Before ES14)</strong><br>In previous versions of JavaScript, manipulating arrays typically involved methods that directly mutated the original array. Some of these methods include:</p><ul><li><strong>reverse()</strong>: Reverses the array in place.</li><li><strong>sort()</strong>: Sorts the array in place.</li><li><strong>splice()</strong>: Adds/removes elements from the array, modifying it in place.</li><li><strong>push(), </strong><strong>pop(), </strong><strong>shift(), </strong><strong>unshift()</strong>: Modify the array by adding/removing elements at the beginning or end.</li></ul><p>These new methods (toReversed, toSorted, toSpliced, and with) expand the versatility of array manipulations and bolster JavaScript’s commitment to providing tools that promote safer, more reliable programming.</p><p><strong>New Methods in ES14<br></strong>ES14 introduces methods that perform similar operations but return a new array, leaving the original array unchanged:</p><blockquote>toReversed()</blockquote><ul><li><strong>Before ES14</strong>: reverse() modifies the original array.</li><li><strong>ES14</strong>: toReversed() returns a new array that is the reverse of the original array.</li></ul><pre>const original = [1, 2, 3, 4];<br>const reversed = original.toReversed();<br>console.log(original); // [1, 2, 3, 4]<br>console.log(reversed); // [4, 3, 2, 1]</pre><blockquote>toSorted()</blockquote><ul><li><strong>Before ES14</strong>: sort() modifies the original array.</li><li><strong>ES14</strong>: toSorted() returns a new array that is sorted without modifying the original.</li></ul><pre>const original = [4, 1, 3, 2];<br>const sorted = original.toSorted();<br>console.log(original); // [4, 1, 3, 2]<br>console.log(sorted); // [1, 2, 3, 4]</pre><blockquote>toSpliced()</blockquote><ul><li><strong>Before ES14</strong>: splice() modifies the original array.</li><li><strong>ES14</strong>: toSpliced() returns a new array with elements added/removed without modifying the original.Copy code</li></ul><pre>const original = [1, 2, 3, 4];<br>const spliced = original.toSpliced(1, 2, 5, 6);<br>console.log(original); // [1, 2, 3, 4]<br>console.log(spliced); // [1, 5, 6, 4]</pre><blockquote>with()</blockquote><ul><li><strong>Before ES14</strong>: Changing an element required directly modifying the array.</li><li><strong>ES14</strong>: with() returns a new array with a specified element replaced.</li></ul><pre>const original = [1, 2, 3, 4];<br>const modified = original.with(2, 99);<br>console.log(original); // [1, 2, 3, 4]<br>console.log(modified); // [1, 2, 99, 4]</pre><p>ECMAScript 2023 (ES14) introduces powerful features like findLast and findLastIndex, hashbang, top-level await, and “Change Array by Copy” methods. These enhancements make JavaScript more robust, efficient, and developer-friendly. <br>Stay tuned for more tech updates and follow me for insights into the latest web technologies!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80152847512b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Get the Tree Structure of a Project]]></title>
            <link>https://medium.com/@anjusha.khandavalli/how-to-get-the-tree-structure-of-a-project-c320d95d3629?source=rss-8cea92ad3a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/c320d95d3629</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Anjusha K]]></dc:creator>
            <pubDate>Tue, 30 Jul 2024 01:49:19 GMT</pubDate>
            <atom:updated>2024-07-30T01:49:19.286Z</atom:updated>
            <content:encoded><![CDATA[<p>I recently wrote some documentation at work that needed a tree diagram of my project structure. During this process, I learned various methods to achieve this and thought of sharing them with everyone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rrSEWkW6DYdUSjAPNsvKWg.png" /></figure><h3><strong>Methods to get the Tree structure</strong></h3><blockquote><strong>Using the </strong><strong>tree Command</strong><br> The tree command is a popular utility for listing the contents of directories in a tree-like format. Its simple and effective.</blockquote><p><strong><em>Installation:</em></strong></p><ul><li><strong>Linux</strong>: Use your package manager. For example, on Ubuntu, run:</li></ul><pre>sudo apt-get install tree</pre><ul><li><strong>macOS</strong>: Use Homebrew:</li></ul><pre>brew install tree</pre><ul><li>Windows: Use Chocolatey:</li></ul><pre>choco install tree</pre><p><em>Usage:</em></p><p>Navigate to your project directory and run:</p><pre>tree</pre><p>This command will display the directory structure starting from the current directory.</p><p><em>Options:</em></p><ul><li>To limit the depth of the tree, use -L :</li></ul><pre>tree -L 2</pre><ul><li>To include hidden files, use -a :</li></ul><pre>tree -a</pre><blockquote><strong>Using </strong><strong>ls Command with </strong><strong>grep and </strong><strong>sed <br></strong>If you don’t have tree installed, you can use a combination of ls , grep and sed to create a similar output.</blockquote><pre>ls -R | grep &quot;:$&quot; | sed -e &#39;s/:$//&#39; -e &#39;s/[^-][^\/]*\//--/g&#39; -e &#39;s/^/ /&#39; -e &#39;s/-/|/&#39;</pre><p>This command lists all directories recursively and formats the output to resemble a tree structure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c320d95d3629" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What exactly is StyledEngineProvider from MUI]]></title>
            <link>https://medium.com/@anjusha.khandavalli/what-exactly-is-styledengineprovider-from-mui-4e9073b02408?source=rss-8cea92ad3a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e9073b02408</guid>
            <category><![CDATA[styled-components]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Anjusha K]]></dc:creator>
            <pubDate>Tue, 05 Mar 2024 08:29:17 GMT</pubDate>
            <atom:updated>2024-03-05T08:29:17.579Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*RarxcWV_M93z2oqixGJzxQ.png" /></figure><p>MUI v5 and above use Emotion as the default styling engine. The order in which CSS is injected into the DOM can affect how styles are applied due to CSS specificity rules. By default, Emotion appends styles at the end of the head, which means they have higher specificity compared to styles defined earlier in the head. This behavior is usually desirable because it ensures that the styles defined in your components override any global styles.</p><p>However, there might be cases where you want to integrate MUI with other libraries or your custom styles, and you prefer these external or custom styles to take precedence over MUI’s styles. This is where StyledEngineProvider comes into play with its injectFirst prop.</p><h3>Without StyledEngineProvider</h3><p>Without using StyledEngineProvider, or specifically without the injectFirst prop, MUI’s styles are injected at the end of the &lt;head&gt; element. This might cause difficulties if you’re trying to override MUI styles with global CSS or styles from other libraries that are loaded in the &lt;head&gt; element of your HTML document.</p><pre>&lt;head&gt;   <br>  &lt;link rel=&quot;stylesheet&quot; href=&quot;global-styles.css&quot;&gt; <br>  &lt;!-- Your custom or global styles --&gt;   <br>  &lt;!-- MUI styles injected here, potentially overriding your global styles --&gt; <br>&lt;/head&gt;</pre><h3>With StyledEngineProvider and injectFirst</h3><p>When you wrap your app with StyledEngineProvider and use the injectFirst prop, MUI’s styles are injected at the beginning of the &lt;head&gt; element. This allows any subsequent styles to override MUI’s default styles if needed.</p><pre>import React from &#39;react&#39;;<br>import { StyledEngineProvider } from &#39;@mui/material/styles&#39;;<br>function App() {<br>    return (<br>        &lt;StyledEngineProvider injectFirst&gt;<br>           {/* Your application components */<br>        &lt;/StyledEngineProvider&gt;;<br>    )<br>}</pre><p>This results in the following order in the &lt;head&gt; element:</p><pre>&lt;head&gt;   <br>  &lt;!-- MUI styles injected here --&gt;   <br>  &lt;link rel=&quot;stylesheet&quot; href=&quot;global-styles.css&quot;&gt; <br>  &lt;!-- Your custom or global styles can now override MUI styles --&gt; <br>&lt;/head&gt;</pre><h3>Conclusion</h3><p>Use StyledEngineProvider with injectFirst when you need to control the injection order of MUI’s styles, particularly if you want to ensure that your global styles or styles from other libraries can override MUI’s default styles. In most other cases, where overriding MUI styles with component-level styles or Emotion’s css prop is sufficient, you might not need StyledEngineProvider.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e9073b02408" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>