<?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 Siddhant Shelake on Medium]]></title>
        <description><![CDATA[Stories by Siddhant Shelake on Medium]]></description>
        <link>https://medium.com/@siddhantshelake?source=rss-a39b98bdb441------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6NET-CE2s7SiKCFSjSMbOg.jpeg</url>
            <title>Stories by Siddhant Shelake on Medium</title>
            <link>https://medium.com/@siddhantshelake?source=rss-a39b98bdb441------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 21:11:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@siddhantshelake/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[Force Upgrading in Mobile Apps: When Should You Make Users Update?]]></title>
            <link>https://medium.com/@siddhantshelake/force-upgrading-in-mobile-apps-when-should-you-make-users-update-ef3bd2cfee58?source=rss-a39b98bdb441------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef3bd2cfee58</guid>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[upgrades-and-migrations]]></category>
            <category><![CDATA[react-native-development]]></category>
            <dc:creator><![CDATA[Siddhant Shelake]]></dc:creator>
            <pubDate>Sun, 04 Oct 2026 06:55:55 GMT</pubDate>
            <atom:updated>2026-10-04T06:55:55.977Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WQo_YH5Z4Bilqf2GwLRmmQ.png" /></figure><p>One of the biggest challenges in mobile development is that, unlike a web application, <strong>you don&#39;t control which version of your client your users are running</strong>.</p><p>You can deploy a new backend today, but thousands—or even millions—of users may still be running an app version released months ago.</p><p>That creates a problem.</p><p>Imagine your backend currently supports:</p><pre>App v1.0<br>App v1.5<br>App v2.0<br>App v2.5</pre><p>Now you introduce a breaking API change in v3.0.</p><p>Your backend team has two choices:</p><ol><li>Continue supporting every old client.</li><li>Require users on older versions to upgrade.</li></ol><p>Supporting every old version sounds safe, but over time it becomes expensive and complicated.</p><p>This is where <strong>force upgrading</strong> becomes useful.</p><h3>What is Force Upgrading?</h3><p>Force upgrading is a mechanism where the application checks its installed version against a minimum supported version.</p><p>For example:</p><pre>Installed version:       2.1.0<br>Minimum supported:       2.5.0</pre><p>Since:</p><pre>2.1.0 &lt; 2.5.0</pre><p>the application asks the user to update before continuing.</p><p>The important idea is:</p><blockquote><strong><em>The backend decides whether the installed client version is still supported.</em></strong></blockquote><p>The mobile application simply enforces that decision.</p><h3>Why Do We Need It?</h3><p>There are several situations where continuing to support an old client becomes problematic.</p><h3>1. Backend compatibility changes</h3><p>Suppose your old application calls:</p><pre>POST /v1/messages</pre><p>with:</p><pre>{<br>  &quot;text&quot;: &quot;Hello&quot;<br>}</pre><p>Your new backend expects:</p><pre>{<br>  &quot;content&quot;: &quot;Hello&quot;,<br>  &quot;conversationId&quot;: &quot;123&quot;<br>}</pre><p>You could keep supporting both formats:</p><pre>Old clients → Old API behavior<br>New clients → New API behavior</pre><p>But as more versions accumulate, the backend becomes increasingly complicated.</p><p>Eventually you might have:</p><pre>v1 client → API behavior A<br>v2 client → API behavior B<br>v3 client → API behavior C<br>v4 client → API behavior D</pre><p>That&#39;s a lot of compatibility code to maintain.</p><p>Instead, once you&#39;ve verified that the new backend is stable, you can say:</p><pre>Minimum supported version = 4.0</pre><p>and require older clients to upgrade.</p><h3>2. Security Vulnerabilities</h3><p>This is an even stronger reason.</p><p>Imagine an old version of your application contains a serious security vulnerability.</p><p>If users continue using that version, the vulnerability remains exploitable.</p><p>In such cases:</p><pre>Old version<br>     ↓<br>Security vulnerability<br>     ↓<br>User remains exposed</pre><p>A force upgrade can remove that old client from your supported ecosystem:</p><pre>Old version<br>     ↓<br>Update required<br>     ↓<br>New secure version</pre><p>For security-critical issues, a <strong>hard upgrade</strong> may be justified.</p><h3>3. Regulatory Compliance</h3><p>Some applications operate in heavily regulated industries such as:</p><ul><li>Healthcare</li><li>Finance</li><li>Privacy-sensitive applications</li></ul><p>A new regulation may introduce requirements that older versions of the application cannot satisfy.</p><p>In that situation, allowing old versions to continue operating may create compliance problems.</p><p>So the application may need to enforce:</p><pre>Old version → unsupported<br>New compliant version → required</pre><h3>4. Analytics Consistency</h3><p>This is an interesting reason that is often overlooked.</p><p>Suppose your analytics system expects events in this format:</p><pre>{<br>  &quot;event&quot;: &quot;purchase&quot;,<br>  &quot;productId&quot;: &quot;123&quot;,<br>  &quot;currency&quot;: &quot;INR&quot;<br>}</pre><p>But older clients send:</p><pre>{<br>  &quot;event&quot;: &quot;purchase&quot;,<br>  &quot;product&quot;: &quot;123&quot;<br>}</pre><p>Now your analytics data becomes fragmented across versions.</p><p>That can affect:</p><ul><li>dashboards</li><li>experimentation</li><li>product decisions</li><li>business metrics</li></ul><p>Moving users to a newer version can make the data collected across your user base more consistent.</p><h3>But Should We Always Force an Update?</h3><p><strong>No.</strong></p><p>Force upgrades create friction.</p><p>Imagine opening an app because you urgently need something and seeing:</p><blockquote><em>&quot;You must update before continuing.&quot;</em></blockquote><p>If the update is 200 MB and you&#39;re on a poor network, that&#39;s a terrible experience.</p><p>Therefore, force upgrading should have a <strong>clear justification</strong>.</p><p>A useful spectrum is:</p><pre>Less enforcement                  <br>More enforcement<br><br>Soft Upgrade → Tiered Grace Period → Hard Upgrade</pre><h3>Soft Upgrade</h3><p>The user is encouraged to update, but can continue using the application.</p><p>For example:</p><pre>┌──────────────────────────────┐<br>│     New version available    │<br>│                              │<br>│ Update now to get the latest │<br>│ improvements and fixes.      │<br>│                              │<br>│ [ Update ]     [ Later ]     │<br>└──────────────────────────────┘</pre><p>This is useful when the update is recommended but <strong>not mandatory</strong>.</p><p>The downside?</p><p>Some users may continue ignoring the update for months.</p><h3>Hard Upgrade</h3><p>A hard upgrade completely blocks the application until the user updates.</p><pre>┌──────────────────────────────┐<br>│       Update required        │<br>│                              │<br>│ Your version is no longer    │<br>│ supported. Please update     │<br>│ to continue.                 │<br>│                              │<br>│          [ Update ]          │<br>└──────────────────────────────┘</pre><p>This makes sense when:</p><ul><li>there is a critical security vulnerability</li><li>the backend is no longer compatible</li><li>the old client cannot satisfy an important requirement</li></ul><p>But it should be used carefully because it creates significant user friction.</p><h3>Tiered Grace Period</h3><p>There is also a middle ground.</p><p>Instead of immediately blocking the user:</p><pre>Day 1<br>↓<br>Soft upgrade<br><br>Day 7<br>↓<br>Persistent reminder<br><br>Day 14<br>↓<br>Hard upgrade</pre><p>This gives users time to update while still allowing the engineering team to eventually enforce the requirement.</p><h3>How Do We Implement It?</h3><p>The implementation can be surprisingly simple.</p><p>When the application starts, the client sends its version information to the backend.</p><p>For example:</p><pre>GET /v1/app-version</pre><p>The backend could return:</p><pre>{<br>  &quot;minimumSupportedVersion&quot;: &quot;2.5.0&quot;,<br>  &quot;latestVersion&quot;: &quot;3.1.0&quot;,<br>  &quot;upgradeRequired&quot;: true,<br>  &quot;upgradeType&quot;: &quot;hard&quot;<br>}</pre><p>The flow becomes:</p><pre>              App starts<br>                 │<br>                 ▼<br>        Send installed version<br>                 │<br>                 ▼<br>        Version Check API<br>                 │<br>                 ▼<br>       Backend evaluates policy<br>                 │<br>          ┌──────┴──────┐<br>          │             │<br>       Supported     Upgrade<br>          │             │<br>          ▼             ▼<br>       Continue      Show UI<br>                        │<br>                 ┌──────┴──────┐<br>                 │             │<br>               Soft          Hard<br>                 │             │<br>              Continue       Block</pre><p>This is an important architectural point:</p><blockquote><strong><em>The backend owns the version-support policy; the client owns the user experience for enforcing it.</em></strong></blockquote><h3>What Happens When the User Has Poor Internet?</h3><p>This is where real-world engineering gets interesting.</p><p>Imagine the user is running:</p><pre>App v2.0</pre><p>and:</p><pre>Minimum supported = v3.0</pre><p>But they&#39;re currently offline.</p><p>If your app immediately requires a network call before doing anything, the user might be completely locked out.</p><p>That&#39;s why force-upgrade systems need to consider:</p><ul><li>poor connectivity</li><li>offline usage</li><li>temporary backend failures</li><li>users on slow networks</li><li>devices that cannot support the newest version</li></ul><p>For non-critical upgrades, a grace period can provide a better experience.</p><h3>What About Old Devices?</h3><p>Another edge case:</p><pre>Latest app version → requires Android 14<br>User device → Android 10</pre><p>The user may technically be unable to install the latest version.</p><p>So force-upgrade logic should consider <strong>device compatibility</strong>, not just version numbers.</p><p>Otherwise you can end up telling a user:</p><blockquote><em>&quot;Please update.&quot;</em></blockquote><p>while the app store has no compatible update available for their device.</p><h3>A Practical API Design</h3><p>A simple production-oriented response might look like:</p><pre>{<br>  &quot;minimumSupportedVersion&quot;: &quot;2.5.0&quot;,<br>  &quot;latestVersion&quot;: &quot;3.2.0&quot;,<br>  &quot;upgradeType&quot;: &quot;soft&quot;,<br>  &quot;storeUrl&quot;: &quot;...&quot;,<br>  &quot;message&quot;: &quot;A newer version is available.&quot;<br>}</pre><p>The client can then compare:</p><pre>installedVersion<br>        ↓<br>minimumSupportedVersion<br>        ↓<br>Should user be blocked?</pre><p>The mobile UI doesn&#39;t need to know <strong>why</strong> the backend made this decision.</p><p>It simply enforces the policy.</p><h3>React Native Example</h3><p>In a React Native application, you might have something conceptually like:</p><pre>const versionPolicy = await versionService.check();<br><br>if (versionPolicy.upgradeType === &#39;hard&#39;) {<br>  navigation.replace(&#39;ForceUpgrade&#39;);<br>}</pre><p>The important architectural part is not the navigation code.</p><p>Keep the version-checking logic outside the UI:</p><pre>App<br> │<br> ▼<br>Version Service<br> │<br> ▼<br>Version Check API<br> │<br> ▼<br>Version Policy<br> │<br> ▼<br>UI</pre><p>This keeps the responsibility separated.</p><h3>When Should You Mention Force Upgrades in an HLD Interview?</h3><p>This is actually a good <strong>mobile system design interview signal</strong>.</p><p>You don&#39;t need to bring it up randomly.</p><p>Mention it when discussing:</p><h3>API versioning</h3><blockquote><em>&quot;We should consider how older mobile clients will interact with the new backend. For breaking changes, we can maintain backward compatibility temporarily and eventually use a minimum-supported-version policy with force upgrades.&quot;</em></blockquote><h3>Security</h3><blockquote><em>&quot;For a critical vulnerability affecting older clients, we may require a hard upgrade.&quot;</em></blockquote><h3>Backend migration</h3><blockquote><em>&quot;Once the new API has been validated, we can retire the old API and require affected clients to upgrade.&quot;</em></blockquote><h3>Large-scale mobile systems</h3><p>When you have millions of users, supporting every historical client version indefinitely becomes increasingly expensive.</p><h3>The Bigger System Design Lesson</h3><p>Force upgrading isn&#39;t really about displaying an <strong>&quot;Update App&quot;</strong> popup.</p><p>It&#39;s about managing the relationship between:</p><pre>Mobile Clients<br>      ↕<br>Backend APIs<br>      ↕<br>Business / Security Requirements</pre><p>Mobile clients have long lifetimes and cannot be updated instantly.</p><p>Therefore, a mature mobile system needs a strategy for:</p><pre>Version compatibility<br>        ↓<br>Migration<br>        ↓<br>Deprecation<br>        ↓<br>Enforcement</pre><p>And force upgrading is one tool for the final step.</p><h3>The takeaway</h3><p>I would remember this simple rule for interviews:</p><blockquote><strong><em>Use soft upgrades when an update is recommended. Use hard upgrades when continuing to support the old client creates a real technical, security, compliance, or compatibility problem.</em></strong></blockquote><p>And most importantly:</p><p><strong>Don&#39;t force users to upgrade just because a new version exists. Force them when the old version should no longer be allowed to operate safely or correctly.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef3bd2cfee58" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Google Knows Your Android App Is Performing Poorly]]></title>
            <link>https://medium.com/@siddhantshelake/how-google-knows-your-android-app-is-performing-poorly-8691adf48764?source=rss-a39b98bdb441------2</link>
            <guid isPermaLink="false">https://medium.com/p/8691adf48764</guid>
            <category><![CDATA[google-play-store]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[google-core-web-vitals]]></category>
            <dc:creator><![CDATA[Siddhant Shelake]]></dc:creator>
            <pubDate>Sun, 04 Oct 2026 05:37:05 GMT</pubDate>
            <atom:updated>2026-10-04T05:37:05.023Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WSfu1GYRdSC-j32g6owvXw.png" /></figure><p>You optimized your React Native app.</p><p>You reduced unnecessary renders.</p><p>You optimized your FlatList.</p><p>You moved expensive work away from the UI path.</p><p>Everything looks good locally.</p><p>But what happens after your app reaches <strong>thousands or millions of real devices</strong>?</p><p>You can’t personally test your app on every Android device, OS version, RAM configuration, and network condition.</p><p>So how does Google know whether your app is actually performing well?</p><p>The answer is <strong>Android Vitals</strong>.</p><h3>Your App Is Running on Thousands of Real Devices</h3><p>Once an Android app is published on Google Play, it runs in the real world.</p><p>Users have:</p><ul><li>Different Android versions</li><li>Different RAM configurations</li><li>Different CPUs</li><li>Different network conditions</li><li>Different device manufacturers</li><li>Different usage patterns</li></ul><p>A developer might test:</p><pre>Pixel<br>12 GB RAM<br>Fast Wi-Fi<br>Development build</pre><p>But a real user might have:</p><pre>Budget Android phone<br>4 GB RAM<br>Poor mobile network<br>Heavy background activity</pre><p>The application can behave very differently.</p><p>This is where Android Vitals becomes useful.</p><p>When users allow the relevant data collection, Android-powered devices track app-quality metrics such as <strong>stability, performance, battery usage, and permission issues</strong>, and Google makes the resulting information available through Android Vitals. <a href="https://developer.android.com/games/optimize/vitals">https://developer.android.com/games/optimize/vitals</a></p><h3>What Does Google Actually Measure?</h3><p>One particularly important category is <strong>stability</strong>.</p><p>For example:1. Crashes</p><p>Imagine:</p><pre>User opens app<br>      ↓<br>User taps &quot;Messages&quot;<br>      ↓<br>Unhandled error<br>      ↓<br>💥 App crashes</pre><p>Android Vitals can measure crash rates from real users.</p><p>Google specifically tracks <strong>user-perceived crash rate</strong>, which measures the percentage of daily active users who experience at least one crash while actively using the app. <a href="https://developer.android.com/topic/performance/issues/crash">https://developer.android.com/topic/performance/issues/crash</a></p><h3>2. ANRs</h3><p>ANR means:</p><blockquote><strong><em>Application Not Responding</em></strong></blockquote><p>Imagine your app blocks the Android UI thread for too long:</p><pre>User taps<br>   ↓<br>UI thread blocked<br>   ↓<br>Android waits<br>   ↓<br>App stops responding<br>   ↓<br>ANR</pre><p>Google’s documentation explicitly says that when the Android UI thread is blocked for too long, an ANR can occur, and Android Vitals tracks ANR metrics. <a href="https://developer.android.com/google/play/vitals/anr?authuser=90">https://developer.android.com/google/play/vitals/anr?authuser=90</a></p><p>This is particularly interesting for React Native developers.</p><p>If our architecture causes expensive work to block the relevant execution path, we aren’t just creating a “slightly slow” application.</p><p>We can potentially create a <strong>real stability problem</strong>.</p><h3>And Here’s the Interesting Part</h3><p>Google Play doesn’t just collect these metrics for a dashboard.</p><p>Some <strong>core Android Vitals affect app visibility on Google Play</strong>.</p><p>Google currently defines bad-behavior thresholds such as:</p><p><strong>User-perceived crash rate:</strong> <strong>1.09%</strong></p><p><strong>User-perceived ANR rate:</strong> <strong>0.47%</strong></p><p>These are the overall bad-behavior thresholds. There are also device-specific thresholds. For example, the current per-phone-model threshold for both user-perceived crashes and ANRs is <strong>8%</strong>. <a href="https://developer.android.com/games/optimize/vitals">https://developer.android.com/games/optimize/vitals</a></p><p>If an app exceeds a bad-behavior threshold, Google says Play <strong>may reduce the app’s visibility</strong>, and in some cases may show users a warning on the store listing. <a href="https://support.google.com/googleplay/android-developer/answer/9844486?hl=en-GB&amp;utm_source=chatgpt.com">Google Help</a></p><p>So the chain becomes:</p><pre>Poor architecture<br>      ↓<br>Slow / blocked UI<br>      ↓<br>ANRs / crashes / excessive resource usage<br>      ↓<br>Android Vitals<br>      ↓<br>Google Play evaluates technical quality<br>      ↓<br>Potential discoverability impact</pre><p>That’s a much bigger deal than:</p><blockquote><em>“The screen feels a little slow.”</em></blockquote><h3>A React Native Example</h3><p>Imagine we have a feed with <strong>10,000 records</strong>.</p><p>Someone writes:</p><pre>const processed = records<br>  .filter(...)<br>  .sort(...)<br>  .map(...);</pre><p>and this operation is expensive enough to block the relevant JS/UI execution path.</p><p>The user might experience:</p><pre>Scroll<br> ↓<br>Jank</pre><pre>Tap<br> ↓<br>Delayed response</pre><pre>Animation<br> ↓<br>Stutters</pre><p>At small scale, you might never notice it.</p><p>But now imagine thousands of users running your application on different devices.</p><p>You can start seeing real-world stability and responsiveness problems.</p><p>That’s why performance should be considered <strong>during system design</strong>, not as an afterthought.</p><h3>Performance Is More Than “Fast Code”</h3><p>The book’s performance section gives a useful holistic view:</p><pre>                 Performance<br>                      │<br>       ┌──────────────┼──────────────┐<br>       ↓              ↓              ↓<br> UI Responsiveness  Network       Memory<br>                    Efficiency    Management<br>       │<br>       └──────────────┬──────────────<br>                      ↓<br>                 Battery<br>                 Optimization</pre><p>A mobile application can be technically functional and still provide a terrible experience because it:</p><ul><li>consumes too much memory</li><li>makes unnecessary network requests</li><li>drains battery</li><li>blocks UI interactions</li><li>crashes</li><li>produces ANRs</li></ul><p>Google’s current Android Vitals also includes metrics beyond crashes and ANRs, including memory and battery-related signals. <a href="https://developer.android.com/games/optimize/vitals?utm_source=chatgpt.com">Android Developers</a></p><h3>The Lesson for Mobile Developers</h3><p>When designing a mobile system, don’t ask only:</p><blockquote><strong><em>“Does it work?”</em></strong></blockquote><p>Ask:</p><blockquote><strong><em>“How does it behave on a real device under real conditions?”</em></strong></blockquote><p>Because your architecture eventually runs on:</p><pre>Millions of users<br>        ↓<br>Thousands of device configurations<br>        ↓<br>Different network conditions<br>        ↓<br>Different memory/CPU constraints<br>        ↓<br>Real-world performance data</pre><p>And on Android, some of that technical quality feeds into <strong>Android Vitals and Google Play’s app-quality/discoverability systems</strong>. <a href="https://developer.android.com/games/optimize/vitals?utm_source=chatgpt.com">Android Developers</a></p><h3>Final takeaway</h3><blockquote><strong><em>Performance isn’t just a developer concern. On mobile, it directly affects user experience, stability, retention, and potentially how discoverable your app is on the Play Store.</em></strong></blockquote><p>That’s why things like <strong>UI responsiveness, efficient networking, memory management, and battery optimization</strong> belong in a mobile system-design discussion.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8691adf48764" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Tried Direct Prompting, Zero-Shot CoT and Few-Shot CoT — Here’s What I Learned]]></title>
            <link>https://medium.com/@siddhantshelake/i-tried-direct-prompting-zero-shot-cot-and-few-shot-cot-heres-what-i-learned-07140ed42dfd?source=rss-a39b98bdb441------2</link>
            <guid isPermaLink="false">https://medium.com/p/07140ed42dfd</guid>
            <category><![CDATA[chatgpt-prompting]]></category>
            <category><![CDATA[prompting-technique]]></category>
            <category><![CDATA[ai-prompts]]></category>
            <category><![CDATA[few-shot-prompting]]></category>
            <dc:creator><![CDATA[Siddhant Shelake]]></dc:creator>
            <pubDate>Fri, 14 Aug 2026 04:59:19 GMT</pubDate>
            <atom:updated>2026-08-14T04:59:19.318Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0UTkhkd7EvkOkzt0Bk40hg.png" /></figure><p>When I first started experimenting with LLMs, I assumed prompt engineering was mostly about finding the “right words” to put into a prompt.</p><p>If the model gave me a wrong answer, I would make the prompt longer.</p><p>If that didn’t work, I’d add an example.</p><p>If that still didn’t work, I’d tell the model to think step by step.</p><p>But after experimenting with different prompting strategies, I realized something more interesting:</p><blockquote><strong><em>A more complicated prompt is not automatically a better prompt.</em></strong></blockquote><p>Sometimes a simple question is enough.</p><p>Sometimes adding a reasoning instruction helps significantly.</p><p>And sometimes adding examples increases token usage without improving the result.</p><p>In this article, I’ll walk through what I learned while experimenting with <strong>Direct Prompting, Zero-Shot Chain-of-Thought, Few-Shot Prompting, Few-Shot CoT, and Self-Consistency.</strong></p><p>I’ll keep the examples simple because the goal isn’t to understand a complicated problem.</p><p>The goal is to understand <strong>what changes when we change the prompt.</strong></p><h3>1. First, A Simple Mental Model of LLMs</h3><p>Before talking about prompting techniques, there’s one thing I had to understand.</p><p>An LLM isn’t a traditional function where:</p><pre>input → fixed output</pre><p>Instead, it generates tokens based on probabilities.</p><p>A simplified view looks like:</p><pre>Prompt<br>   ↓<br>Probability distribution<br>   ↓<br>Next token<br>   ↓<br>Next token<br>   ↓<br>Next token<br>   ↓<br>Final response</pre><p>This is why the same question can sometimes produce different responses.</p><p>The model is essentially choosing among possible continuations based on probabilities.</p><p>So when I think about prompt engineering now, I don’t think:</p><blockquote><em>“How do I force the model to think?”</em></blockquote><p>I think:</p><blockquote><strong><em>“How can I structure the prompt so that the probability of getting the answer I want increases?”</em></strong></blockquote><p>That’s the bigger idea behind the techniques we’re about to discuss.</p><h3>2. Direct Prompting — Just Ask</h3><p>Let’s start with the simplest possible approach.</p><p>Suppose I ask:</p><pre>What is the capital of France?</pre><p>The model can simply answer:</p><pre>Paris.</pre><p>That’s it.</p><p>No examples.</p><p>No special instructions.</p><p>No reasoning.</p><p>This is essentially <strong>Direct Prompting</strong>.</p><p>The structure is:</p><pre>Question<br>   ↓<br>Answer</pre><p>For simple questions, this is usually exactly what I want.</p><p>The advantages are obvious:</p><ul><li>Simple</li><li>Fast</li><li>Cheap</li><li>Easy to maintain</li><li>Low token consumption</li></ul><p>But problems can appear when the question requires multiple steps of reasoning.</p><p>For example:</p><pre>A movie starts at 7:30 PM and lasts 2 hours.<br>What time does it finish?</pre><p>The model needs to understand:</p><pre>7:30 PM<br>+ 2 hours<br>= 9:30 PM</pre><p>For simple reasoning like this, direct prompting may still work perfectly.</p><p>But as the reasoning becomes more complicated, I found it useful to explicitly encourage the model to reason.</p><p>That’s where Chain-of-Thought comes in.</p><h3>3. Zero-Shot Chain-of-Thought</h3><p>The simplest version of Chain-of-Thought is <strong>Zero-Shot CoT</strong>.</p><p>“Zero-shot” means:</p><blockquote><strong><em>I don’t give the model any examples.</em></strong></blockquote><p>Instead, I simply give it a reasoning instruction.</p><p>For example:</p><pre>A movie starts at 7:30 PM and lasts 2 hours.<br>What time does it finish?</pre><pre>Let&#39;s think step by step.</pre><p>The important addition is:</p><pre>Let&#39;s think step by step.</pre><p>We’re encouraging the model to work through intermediate steps before arriving at the answer.</p><p>Conceptually:</p><pre>Direct Prompting</pre><pre>Question<br>   ↓<br>Answer</pre><p>Whereas:</p><pre>Zero-Shot CoT</pre><pre>Question<br>   ↓<br>Reasoning<br>   ↓<br>Answer</pre><p>That’s the core idea.</p><h3>4. Why Would Reasoning Help?</h3><p>Let’s take a slightly different example.</p><p>Imagine I ask:</p><pre>A shop has 20 chocolates.<br>It sells 7 in the morning and 5 in the evening.<br>How many chocolates are left?</pre><p>A direct response might simply be:</p><pre>8</pre><p>But the reasoning is:</p><pre>Start with 20.</pre><pre>20 - 7 = 13</pre><pre>13 - 5 = 8</pre><pre>Answer: 8</pre><p>The reasoning itself isn’t complicated.</p><p>But for a much more complex problem, having intermediate steps can help the model avoid jumping directly to an incorrect answer.</p><p>That’s why Chain-of-Thought became an important prompting technique for reasoning tasks.</p><h3>5. Few-Shot Prompting — Show the Model Some Examples</h3><p>Now let’s change the approach.</p><p>Instead of simply asking the model to perform a task, we can show it examples of how the task should be performed.</p><p>Suppose we’re building a system that classifies messages as either <strong>Urgent</strong> or <strong>Normal</strong>.</p><p>We could write:</p><pre>Example 1:<br>Message:<br>&quot;My account has been hacked.&quot;<br>Category:<br>Urgent<br><br>Example 2:<br>Message:<br>&quot;Can you tell me your weekend opening hours?&quot;<br>Category:<br>Normal<br><br>Now classify:<br>Message:<br>&quot;I can&#39;t access my account.&quot;<br>Category:</pre><p>Here, we’re giving the model examples before asking it to solve the new problem.</p><p>This is <strong>Few-Shot Prompting</strong>.</p><p>The model sees:</p><pre>Example<br>   ↓<br>Example<br>   ↓<br>Example<br>   ↓<br>New Question</pre><p>The examples help the model understand the pattern we want.</p><h3>6. Few-Shot Prompting Is Basically “Show, Don’t Just Tell”</h3><p>This is one of the easiest ways to understand few-shot prompting.</p><p>Imagine you’re teaching someone how to format dates.</p><p>You could tell them:</p><blockquote><em>“Always use DD/MM/YYYY.”</em></blockquote><p>Or you could show them:</p><pre>10 January 2026 → 10/01/2026</pre><pre>25 March 2026 → 25/03/2026</pre><pre>Now convert:</pre><pre>4 August 2026 → ?</pre><p>The examples demonstrate the behavior.</p><p>That’s essentially what we’re doing with an LLM.</p><p>And there’s an important detail here:</p><blockquote><strong><em>The examples need to be good.</em></strong></blockquote><p>If I provide confusing or inconsistent examples, the model may learn the wrong pattern.</p><p>So few-shot prompting isn’t simply about adding more examples.</p><p>It’s about providing <strong>useful examples that represent the task clearly</strong>.</p><h3>7. Few-Shot Chain-of-Thought</h3><p>Now we can combine the two ideas.</p><p>We can give the model examples <strong>and</strong> include the reasoning in those examples.</p><p>For example:</p><pre>Example:<br>Question:<br>A box contains 10 balls.<br>You remove 3.<br>How many are left?<br><br>Reasoning:<br>Start with 10.<br>Remove 3.<br>10 - 3 = 7.<br>Answer:<br>7</pre><p>Then we give it:</p><pre>Question:<br>A box contains 15 balls.<br>You remove 6.<br>How many are left?</pre><pre>Reasoning:</pre><p>Now the model has seen not just the answer, but an example of the reasoning structure.</p><p>That’s <strong>Few-Shot Chain-of-Thought</strong>.</p><p>The flow becomes:</p><pre>Example<br>   ↓<br>Reasoning<br>   ↓<br>Answer</pre><pre>  ↓</pre><pre>New Question<br>   ↓<br>Reasoning<br>   ↓<br>Answer</pre><p>Compared with Zero-Shot CoT:</p><h3>Zero-Shot CoT</h3><pre>Question<br>+<br>&quot;Let&#39;s think step by step.&quot;</pre><h3>Few-Shot CoT</h3><pre>Solved examples<br>+<br>Reasoning examples<br>+<br>New question</pre><p>Few-Shot CoT gives us more control, but that additional control comes at a cost.</p><h3>8. Diminishing Returns From More Examples</h3><p>This is where I started thinking more carefully about few-shot prompting.</p><p>Adding examples can help, but the benefit doesn’t necessarily increase forever.</p><p>Imagine this:</p><pre>Examples Added    Performance<br>1                 Low<br>2                 Better<br>3                 High<br>4                 High<br>5                 High<br>10                High</pre><pre>The first few examples may significantly help the model understand the task.</pre><p>But once the model understands the pattern, additional examples may contribute very little.</p><p>This is called <strong>diminishing returns</strong>.</p><p>So I wouldn’t ask:</p><blockquote><em>“How many examples can I fit into my prompt?”</em></blockquote><p>I’d ask:</p><blockquote><strong><em>“What is the smallest set of examples that gives me the result I need?”</em></strong></blockquote><p>This becomes especially important in production systems, where prompts are executed thousands or millions of times.</p><p>A few unnecessary examples might not matter during experimentation.</p><p>At scale, they can become a real cost.</p><h3>9. What About Modern Reasoning Models?</h3><p>This is another thing worth keeping in mind.</p><p>Modern reasoning-oriented models can perform substantial reasoning internally.</p><p>That means I don’t always need to explicitly provide a long Chain-of-Thought prompt.</p><p>Sometimes this:</p><pre>Solve this problem.</pre><p>is already enough.</p><p>Adding:</p><pre>Let&#39;s think step by step.</pre><p>may not provide a meaningful improvement.</p><p>And adding several detailed examples may make the prompt much more expensive without making the answer better.</p><p>So today, I don’t treat Chain-of-Thought as something I should automatically add to every prompt.</p><p>I treat it as something I should <strong>test when the task requires reasoning</strong>.</p><h3>10. What If One Reasoning Path Is Wrong?</h3><p>There’s another technique I found interesting: <strong>Self-Consistency</strong>.</p><p>The basic idea is simple.</p><p>Instead of asking the model once, ask it multiple times and compare the answers.</p><p>For example, imagine we ask the same question five times:</p><pre>Run 1 → A<br>Run 2 → B<br>Run 3 → A<br>Run 4 → A<br>Run 5 → B</pre><p>We have:</p><pre>A → 3 votes<br>B → 2 votes</pre><p>So we choose:</p><pre>A</pre><p>The idea is that different runs can produce different reasoning paths.</p><p>Instead of trusting one path, we look for the answer that appears most consistently.</p><p>This is called <strong>Self-Consistency</strong>.</p><h3>11. But Again, There Is a Trade-Off</h3><p>If one model call costs:</p><pre>$X</pre><p>and I run it five times, I may now be spending roughly:</p><pre>5 × $X</pre><p>There can also be additional latency.</p><p>So Self-Consistency can potentially improve reliability, but it comes with a price.</p><p>The trade-off becomes:</p><pre>More runs<br>   ↓<br>More reasoning paths<br>   ↓<br>Potentially better reliability<br>   ↓<br>But...<br>   ↓<br>More cost + latency</pre><p>This is why I don’t think there is a single prompting technique that is “the best.”</p><p>It depends on what I’m optimizing for.</p><h3>12. How I Decide Which Technique to Use</h3><p>After experimenting with these approaches, this is the mental model I find most useful.</p><p>I start with the simplest option.</p><pre>               Direct Prompt<br>                     ↓<br>              Is accuracy good?<br>                /          \<br>              Yes           No<br>              ↓              ↓<br>             Done      Zero-Shot CoT<br>                            ↓<br>                     Is accuracy good?<br>                       /          \<br>                     Yes           No<br>                     ↓              ↓<br>                    Done      Few-Shot CoT<br>                                   ↓<br>                          Still inconsistent?<br>                                   ↓<br>                           Self-Consistency</pre><p>This prevents me from unnecessarily making every prompt complicated.</p><h3>13. The Three Metrics I Would Watch</h3><p>When I evaluate an LLM prompting strategy, I wouldn’t look at accuracy alone.</p><p>I’d track at least three things.</p><h3>1. Accuracy</h3><p>How often does the model give the correct answer?</p><h3>2. Cost</h3><p>How many tokens and API calls are required?</p><h3>3. Latency</h3><p>How long does the user have to wait?</p><p>Imagine I have two approaches:</p><pre>Approach A<br>Accuracy: 95%<br>Cost: Low<br>Latency: Low<br></pre><pre>Approach B<br>Accuracy: 96%<br>Cost: 5× higher<br>Latency: 4× higher</pre><p>Is B automatically better?</p><p>Not necessarily.</p><p>If that extra 1% accuracy isn’t important for my application, A may be the better engineering decision.</p><p>This is why prompting is not only an AI problem.</p><p>It’s also an <strong>engineering trade-off problem</strong>.</p><h3>14. My Practical Prompting Workflow</h3><p>If I were building an LLM feature today, I’d probably follow something like this.</p><h3>Step 1 — Start With Direct Prompting</h3><p>Don’t over-engineer the first version.</p><pre>Question → Answer</pre><h3>Step 2 — Create a Small Evaluation Set</h3><p>Take real examples from the problem you’re solving.</p><p>For example, if I’m building a customer-support classifier, collect real types of questions users might ask.</p><h3>Step 3 — Measure</h3><p>Track:</p><pre>Accuracy<br>Tokens<br>Latency<br>Cost</pre><h3>Step 4 — Try Zero-Shot CoT</h3><p>If the task requires multi-step reasoning and direct prompting isn’t performing well, try a simple reasoning instruction.</p><h3>Step 5 — Try Few-Shot Prompting</h3><p>If the model needs help understanding the expected behavior or output format, provide a few high-quality examples.</p><h3>Step 6 — Try Few-Shot CoT</h3><p>If the reasoning structure itself matters, demonstrate that structure through examples.</p><h3>Step 7 — Consider Self-Consistency</h3><p>If reliability is extremely important and the additional cost is acceptable, generate multiple responses and compare them.</p><h3>15. The Bigger Lesson I Took Away</h3><p>Before experimenting with these techniques, I thought prompt engineering was mainly about finding clever instructions.</p><p>Now I think about it differently.</p><p>Prompt engineering is closer to <strong>optimization</strong>.</p><p>I’m trying to find the smallest amount of guidance that gives me the reliability I need.</p><p>Something like:</p><pre>             More Guidance<br>                   ↑<br>                   │<br>          Few-Shot CoT<br>                   │<br>          Zero-Shot CoT<br>                   │<br>             Direct<br>                   │<br>                   └────────────→<br>                     Cost</pre><p>As I add more guidance, I may get better results.</p><p>But I also increase:</p><ul><li>Prompt size</li><li>Token usage</li><li>Cost</li><li>Latency</li><li>Complexity</li></ul><p>So the goal isn’t:</p><blockquote><strong><em>“Use the most advanced prompting technique.”</em></strong></blockquote><p>The goal is:</p><blockquote><strong><em>“Use the simplest technique that gives you good enough results.”</em></strong></blockquote><h3>16. Final Takeaways</h3><p>After experimenting with these approaches, this is how I remember them.</p><h3>Direct Prompting</h3><p>Just ask the question.</p><pre>Question → Answer</pre><p>Best when the task is simple.</p><h3>Zero-Shot CoT</h3><p>Don’t provide examples.</p><p>Just encourage reasoning.</p><pre>Question<br>+<br>&quot;Let&#39;s think step by step.&quot;</pre><p>Useful for multi-step reasoning.</p><h3>Few-Shot Prompting</h3><p>Give the model examples.</p><pre>Example<br>Example<br>Example<br>↓<br>New Question</pre><p>Useful when the model needs to understand a pattern or expected output.</p><h3>Few-Shot CoT</h3><p>Give examples that include reasoning.</p><pre>Example<br>↓<br>Reasoning<br>↓<br>Answer</pre><p>Useful when you want the model to follow a particular reasoning structure.</p><h3>Self-Consistency</h3><p>Run the problem multiple times and compare the answers.</p><pre>Run 1 → A<br>Run 2 → B<br>Run 3 → A<br>Run 4 → A<br>Run 5 → B</pre><pre>Majority → A</pre><p>Useful when reliability matters enough to justify the extra cost.</p><h3>The One Thing I’d Remember</h3><p>If I had to reduce everything in this article to one principle, it would be this:</p><blockquote><strong><em>Don’t make your prompt complicated just because you can.</em></strong></blockquote><p>Start with a simple prompt.</p><p>Measure the result.</p><p>If it isn’t good enough, add reasoning.</p><p>If that’s still not enough, add examples.</p><p>If consistency is still a problem and the cost is acceptable, consider multiple runs.</p><p>In other words:</p><pre>Start Simple<br>     ↓<br>Measure<br>     ↓<br>Improve<br>     ↓<br>Measure Again</pre><p>Because ultimately, a prompt isn’t good because it looks sophisticated.</p><p><strong>It’s good because it reliably gets the job done at an acceptable cost and latency.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=07140ed42dfd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Design Patterns Explained: Write Better Software, Not More Code]]></title>
            <link>https://medium.com/@siddhantshelake/design-patterns-explained-write-better-software-not-more-code-10e5dd76def3?source=rss-a39b98bdb441------2</link>
            <guid isPermaLink="false">https://medium.com/p/10e5dd76def3</guid>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[lld]]></category>
            <category><![CDATA[software-design-patterns]]></category>
            <dc:creator><![CDATA[Siddhant Shelake]]></dc:creator>
            <pubDate>Wed, 05 Aug 2026 08:09:01 GMT</pubDate>
            <atom:updated>2026-08-05T08:11:16.506Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0-PeLfkTnzcm0XveseDP5g.png" /></figure><p>Software development is not just about making code work — it’s about writing code that is easy to understand, maintain, and extend. As applications grow, developers often encounter the same design problems repeatedly. Instead of reinventing the wheel every time, we can rely on <strong>Design Patterns</strong>.</p><p>Design patterns are not frameworks or libraries. They are <strong>proven solutions</strong> that have evolved over years of software development and are widely accepted as best practices.</p><p>Let’s understand what they are, why they matter, and when you should (and shouldn’t) use them.</p><h3>What is a Design Pattern?</h3><p>A <strong>Design Pattern</strong> is a <strong>proven, reusable solution to a commonly occurring software design problem</strong>.</p><p>Think of it as a <strong>blueprint</strong> rather than actual code.</p><p>Just like an architect uses a blueprint to design different buildings, developers use design patterns to solve common software design challenges.</p><blockquote><strong><em>Important:</em></strong><em> A design pattern tells you </em>how to structure your code<em>, not exactly </em>what code to write<em>.</em></blockquote><h3>Every Design Pattern Describes</h3><p>Every design pattern generally answers five important questions.</p><h3>1. Name</h3><p>The unique name used to identify the pattern.</p><p>Examples:</p><ul><li>Factory</li><li>Builder</li><li>Singleton</li><li>Observer</li><li>Strategy</li></ul><p>Having standardized names helps developers communicate quickly.</p><p>Instead of explaining an entire implementation, someone can simply say:</p><blockquote><em>“Let’s use the Factory Pattern here.”</em></blockquote><p>Everyone immediately understands the overall idea.</p><h3>2. Problem</h3><p>Every pattern exists because a common problem exists.</p><p>For example:</p><ul><li>Too many if-else statements?</li><li>Complex object creation?</li><li>Need multiple interchangeable algorithms?</li><li>Need one global instance?</li></ul><p>A design pattern starts with identifying the recurring problem.</p><h3>3. Solution</h3><p>The pattern then provides a structured way to solve that problem.</p><p>It doesn’t give exact code.</p><p>Instead, it provides guidelines for organizing classes and objects.</p><h3>4. Context</h3><p>A pattern isn’t universal.</p><p>It specifies <strong>when it should be used</strong>.</p><p>Using the correct pattern in the correct situation is more important than simply knowing many patterns.</p><h3>5. Consequences</h3><p>Every pattern has trade-offs.</p><p>It improves some aspects while introducing others.</p><p>Typical considerations include:</p><h3>Advantages</h3><ul><li>Better maintainability</li><li>Improved scalability</li><li>Cleaner architecture</li><li>Easier testing</li></ul><h3>Disadvantages</h3><ul><li>Additional classes</li><li>More abstraction</li><li>Increased learning curve</li></ul><p>Understanding these trade-offs is part of good software design.</p><h3>Why Use Design Patterns?</h3><p>Design patterns make software easier to build and maintain over time.</p><h3>♻️ Reusability</h3><p>Patterns solve problems that developers have already solved countless times.</p><p>There’s no need to invent a new solution.</p><h3>📈 Scalability</h3><p>Well-structured code grows more easily as new requirements arrive.</p><p>Adding features becomes less risky.</p><h3>🎯 Consistency</h3><p>Developers across different teams recognize common patterns.</p><p>This creates a shared way of organizing code.</p><h3>⚡ Better Performance (When Applicable)</h3><p>Some patterns improve efficiency by reducing unnecessary work.</p><p>For example:</p><ul><li>Object Pool</li><li>Flyweight</li><li>Proxy</li></ul><p>However, performance should never be the only reason to choose a pattern.</p><h3>👨‍💻 Faster Development</h3><p>Using established solutions reduces design time.</p><p>Developers spend more time solving business problems instead of architectural problems.</p><h3>🐞 Easier Debugging &amp; Maintenance</h3><p>Well-structured code is easier to read.</p><p>New developers can quickly understand the architecture.</p><p>Bug fixes become simpler.</p><h3>🤝 Common Vocabulary</h3><p>Design patterns provide a shared language.</p><p>Instead of saying:</p><blockquote><em>“Let’s create a class that decides which implementation to instantiate…”</em></blockquote><p>Developers simply say:</p><blockquote><em>“Let’s use the Factory Pattern.”</em></blockquote><p>This improves communication within teams.</p><h3>When NOT to Use Design Patterns</h3><p>One of the biggest mistakes developers make is using design patterns everywhere.</p><p><strong>Knowing a pattern doesn’t mean you should apply it.</strong></p><p>A design pattern should solve a real problem.</p><p>Avoid using one when:</p><ul><li>The code is already simple.</li><li>It introduces unnecessary abstraction.</li><li>It adds more complexity than value.</li><li>The project doesn’t need that level of flexibility.</li></ul><h3>Golden Rule</h3><blockquote><strong><em>First solve the problem. Then decide whether a design pattern makes the solution better.</em></strong></blockquote><p>Simple code is often the best code.</p><h3>Common Pitfalls of Using Design Patterns</h3><h3>1. Overengineering</h3><p>Adding multiple layers of abstraction for a small problem.</p><p>Example:</p><p>Creating ten classes just to construct a simple object.</p><h3>2. Misapplication</h3><p>Using the wrong pattern.</p><p>For example:</p><p>Using Singleton when dependency injection would be more appropriate.</p><p>A pattern is only useful if it matches the problem.</p><h3>3. Increased Complexity</h3><p>Some patterns naturally introduce:</p><ul><li>Interfaces</li><li>Abstract classes</li><li>Extra objects</li></ul><p>If the benefits don’t outweigh the complexity, avoid them.</p><h3>4. Inflexibility</h3><p>Ironically, a poorly implemented design pattern can make future changes harder.</p><p>Patterns should improve flexibility — not reduce it.</p><h3>5. Learning Curve</h3><p>Developers unfamiliar with design patterns may struggle to understand the architecture.</p><p>Simple solutions are often easier for new team members.</p><h3>6. Performance Overhead</h3><p>Some patterns create additional objects, method calls, or layers of indirection.</p><p>Usually the overhead is small, but in performance-critical systems it may matter.</p><h3>What Are Anti-Patterns?</h3><p>An <strong>Anti-Pattern</strong> is the opposite of a design pattern.</p><p>It is a solution that initially appears correct but eventually creates serious software design problems.</p><p>Anti-patterns often lead to:</p><ul><li>Increased complexity</li><li>Poor performance</li><li>Tight coupling</li><li>Difficult testing</li><li>Hard maintenance</li></ul><p>In short:</p><blockquote><em>It solves today’s problem while creating tomorrow’s headache.</em></blockquote><h3>Good Rule to Remember</h3><p>A good software design generally follows this principle:</p><p>✅ Simple code</p><p>✅ No unnecessary repetition</p><p>✅ Easy to extend</p><p>✅ Easy to understand</p><p>Avoid designs that have:</p><p>❌ Too many abstractions</p><p>❌ Too many classes</p><p>❌ Unnecessary complexity</p><p>The goal isn’t to write clever code.</p><p>The goal is to write maintainable code.</p><h3>Final Thoughts</h3><p>Design patterns are powerful tools — but they’re just that: <strong>tools</strong>.</p><p>An experienced developer doesn’t use a pattern because they know it.</p><p>They use it because <strong>the problem demands it</strong>.</p><p>As you continue learning patterns like <strong>Factory</strong>, <strong>Builder</strong>, <strong>Prototype</strong>, <strong>Singleton</strong>, <strong>Adapter</strong>, <strong>Strategy</strong>, and <strong>Observer</strong>, remember this simple philosophy:</p><blockquote><strong><em>Good software design isn’t about using more patterns. It’s about choosing the right solution for the right problem.</em></strong></blockquote><p>Master the problem first. The pattern will often reveal itself.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10e5dd76def3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI Buzzwords Explained: A Software Engineer’s Guide to Understanding Modern AI]]></title>
            <link>https://medium.com/@siddhantshelake/ai-buzzwords-explained-a-software-engineers-guide-to-understanding-modern-ai-31e46f990a24?source=rss-a39b98bdb441------2</link>
            <guid isPermaLink="false">https://medium.com/p/31e46f990a24</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Siddhant Shelake]]></dc:creator>
            <pubDate>Mon, 27 Jul 2026 15:12:51 GMT</pubDate>
            <atom:updated>2026-07-27T15:12:51.685Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rcn4DrNQDj39tKTDkUaNow.png" /></figure><p><em>“LLM, RAG, MCP, AI Agents, Vector Databases, Embeddings…”</em></p><p>If you’ve been on LinkedIn, Twitter, or YouTube recently, you’ve probably seen these terms everywhere.</p><p>Everyone seems to be talking about AI, but very few people explain these concepts in a way that’s easy for software engineers to understand.</p><p>Most articles either:</p><ul><li>Dive straight into complex mathematics.</li><li>Throw around fancy terminology without explaining <em>why it matters</em>.</li></ul><p>As a Developer, I wanted to understand these concepts from an engineering perspective — not as a machine learning researcher.</p><p>So I put together this guide.</p><p>By the end of this article, you’ll understand the most common AI buzzwords you’ll encounter in interviews, documentation, and real-world AI applications.</p><p>Let’s begin.</p><h3>1. Large Language Model (LLM)</h3><p>An <strong>LLM</strong> is an AI model trained on massive amounts of text to understand and generate human language by predicting the next token.</p><p>Examples include ChatGPT, Claude, Gemini, and Llama.</p><p>Think of it as a software engineer who has read millions of books, documentation pages, blogs, and GitHub repositories. When you ask a question, it predicts the most appropriate next words based on everything it has learned.</p><h3>2. Token</h3><p>LLMs don’t read complete sentences.</p><p>They first split text into <strong>tokens</strong>.</p><p>For example:</p><pre>React Native is awesome.</pre><p>becomes something like:</p><pre>React<br>Native<br>is<br>awesome<br>.</pre><p>Every AI conversation is ultimately processed as tokens.</p><h3>3. Embeddings</h3><p>Computers don’t understand words.</p><p>They understand numbers.</p><p>An <strong>embedding</strong> converts text into vectors (lists of numbers) while preserving semantic meaning.</p><p>This allows the model to understand that:</p><ul><li>“Car”</li><li>“Vehicle”</li><li>“Automobile”</li></ul><p>are closely related even though they’re different words.</p><p>Embeddings are the foundation of semantic search and Retrieval-Augmented Generation (RAG).</p><h3>4. Attention</h3><p>Attention helps the model determine which words matter most.</p><p>Example:</p><blockquote><em>I deposited money in the bank.</em></blockquote><p>The word <strong>bank</strong> should pay attention to <strong>money</strong>.</p><p>Now consider:</p><blockquote><em>I sat near the bank of the river.</em></blockquote><p>This time <strong>bank</strong> pays attention to <strong>river</strong>.</p><p>Attention allows the same word to have different meanings depending on its context.</p><h3>5. Transformer</h3><p>The Transformer is the neural network architecture behind modern LLMs.</p><p>Its simplified pipeline looks like this:</p><pre>┌────────┐<br>│  Text  │<br>└────────┘<br>      │<br>      ▼<br>┌────────────────┐<br>│   Tokenizer    │<br>│ Splits Text →  │<br>│    Tokens      │<br>└────────────────┘<br>      │<br>      ▼<br>┌────────────────┐<br>│   Embeddings   │<br>│ Tokens →       │<br>│ Vector Numbers │<br>└────────────────┘<br>      │<br>      ▼<br>┌────────────────┐<br>│ Self-Attention │<br>│ Understands    │<br>│ Context        │<br>└────────────────┘<br>      │<br>      ▼<br>┌────────────────┐<br>│ Feed Forward   │<br>│ Refines the    │<br>│ Representation │<br>└────────────────┘<br>      │<br>      ▼<br>┌────────────────┐<br>│ Predict Next   │<br>│     Token      │<br>└────────────────┘</pre><p>Without Transformers, models like ChatGPT wouldn’t exist.</p><h3>6. Fine-Tuning</h3><p>Instead of training a model from scratch, companies often start with a pre-trained model and continue training it on domain-specific data.</p><p>Examples:</p><ul><li>Medical AI</li><li>Legal AI</li><li>Customer Support AI</li></ul><p>This process is called <strong>Fine-Tuning</strong>.</p><h3>7. Few-Shot Prompting</h3><p>Few-shot prompting teaches the model through examples inside the prompt.</p><p>Example:</p><pre>English → French<br>Dog → Chien<br>Cat → Chat<br>Tree →</pre><p>The model learns the pattern without changing its weights.</p><p>Unlike fine-tuning, prompting does <strong>not</strong> retrain the model.</p><h3>8. RAG (Retrieval-Augmented Generation)</h3><p>LLMs don’t always know your company’s documentation or the latest information.</p><p>RAG solves this problem.</p><p>Instead of relying only on what the model learned during training, it first retrieves relevant documents and then uses those documents while generating the answer.</p><p>Pipeline:</p><pre>Question<br>   ↓<br>Retriever<br>   ↓<br>Vector Database<br>   ↓<br>Relevant Documents<br>   ↓<br>  LLM<br>   ↓<br> Answer</pre><p>This is how many production AI assistants work today.</p><h3>9. Vector Database</h3><p>A Vector Database stores embeddings instead of traditional rows and columns.</p><p>Instead of searching for exact keywords, it searches by <strong>meaning</strong>.</p><p>Popular options include:</p><ul><li>Pinecone</li><li>FAISS</li><li>Chroma</li><li>Milvus</li><li>Weaviate</li></ul><p>They’re commonly used with RAG systems.</p><h3>10. MCP (Model Context Protocol)</h3><p>Imagine every external tool had a different API and authentication flow.</p><p>That quickly becomes difficult to manage.</p><p>MCP provides a standardized way for AI models to communicate with tools like:</p><ul><li>Gmail</li><li>GitHub</li><li>Slack</li><li>Databases</li><li>Calendars</li></ul><p>Think of MCP as <strong>USB-C for AI tools</strong>.</p><h3>11. Context Engineering</h3><p>Prompt engineering focuses on writing better prompts.</p><p>Context engineering focuses on providing the right information.</p><p>That context may include:</p><ul><li>Previous conversation</li><li>User preferences</li><li>Documents</li><li>Tool outputs</li><li>Database results</li></ul><p>The better the context, the better the answer.</p><h3>12. AI Agents</h3><p>An AI Agent doesn’t just answer questions.</p><p>It can:</p><ul><li>Plan</li><li>Use tools</li><li>Execute multiple steps</li><li>Retry failures</li><li>Complete tasks autonomously</li></ul><p>Example:</p><p>“Book my flight, reserve a hotel, add everything to my calendar, and email me the itinerary.”</p><p>That’s an AI Agent.</p><h3>13. Reinforcement Learning (RL)</h3><p>Instead of learning from correct answers, the model learns from rewards.</p><p>Good decisions receive positive rewards.</p><p>Bad decisions receive lower rewards.</p><p>Over time, the model learns which actions maximize rewards.</p><h3>14. RLHF</h3><p>RLHF stands for <strong>Reinforcement Learning from Human Feedback</strong>.</p><p>Humans compare multiple AI responses.</p><p>The model learns which responses people prefer.</p><p>This makes modern chatbots more helpful, safer, and better aligned with user expectations.</p><h3>15. Chain of Thought</h3><p>Some problems require intermediate reasoning before producing an answer.</p><p>Chain of Thought encourages models to solve problems step by step.</p><p>Modern reasoning models perform internal reasoning, but they don’t expose those internal thought processes to users.</p><h3>16. Reasoning Models</h3><p>Not every AI model reasons equally.</p><p>Reasoning models spend more computation evaluating multiple possibilities before answering.</p><p>They’re particularly useful for:</p><ul><li>Debugging</li><li>Mathematics</li><li>Planning</li><li>Architecture design</li><li>Complex coding tasks</li></ul><h3>17. Multimodal Models</h3><p>Traditional LLMs only process text.</p><p>Multimodal models can understand:</p><ul><li>Text</li><li>Images</li><li>Audio</li><li>Video</li><li>Documents</li></ul><p>For example, you can upload:</p><ul><li>A crash screenshot</li><li>A Logcat file</li><li>A question</li></ul><p>The model combines all of them to produce one answer.</p><h3>18. Small Language Models (SLMs)</h3><p>Bigger isn’t always better.</p><p>SLMs are designed to be:</p><ul><li>Faster</li><li>Smaller</li><li>Cheaper</li><li>More efficient</li></ul><p>They’re ideal for:</p><ul><li>Autocomplete</li><li>Smart replies</li><li>Spell checking</li><li>On-device AI</li></ul><h3>19. Distillation</h3><p>Imagine a senior engineer mentoring a junior engineer.</p><p>Eventually, the junior learns to solve most of the same problems.</p><p>AI works similarly.</p><p>A smaller <strong>student model</strong> learns from a larger <strong>teacher model</strong>.</p><p>This process is called <strong>Knowledge Distillation</strong>.</p><h3>20. Quantization</h3><p>AI models store billions of numbers called weights.</p><p>Quantization reduces the precision of these numbers.</p><p>The result is:</p><ul><li>Smaller models</li><li>Faster inference</li><li>Lower memory usage</li></ul><p>with little or no noticeable impact on quality in many use cases.</p><h3>Final Thoughts</h3><p>The AI landscape is evolving rapidly, and new buzzwords appear almost every month. While it’s impossible to learn everything, understanding these core concepts gives you a strong foundation for reading documentation, following AI discussions, preparing for interviews, and building AI-powered applications.</p><p>You don’t need to become a machine learning researcher overnight. Start by understanding the fundamentals, connect the concepts together, and focus on how they’re applied in real software systems.</p><p>Once these twenty concepts click, terms like RAG, MCP, AI Agents, and Multimodal Models stop sounding like buzzwords — they become practical tools you can use to build better products.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=31e46f990a24" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Native Linking Module Explained: Promise, EventEmitter & Deep Linking]]></title>
            <link>https://medium.com/@siddhantshelake/react-native-linking-module-explained-promise-eventemitter-deep-linking-466a6e23a50a?source=rss-a39b98bdb441------2</link>
            <guid isPermaLink="false">https://medium.com/p/466a6e23a50a</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[react-native-development]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[deep-linking]]></category>
            <dc:creator><![CDATA[Siddhant Shelake]]></dc:creator>
            <pubDate>Wed, 15 Jul 2026 15:17:13 GMT</pubDate>
            <atom:updated>2026-07-15T15:17:13.814Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ov86bwbdwj8lqFRwCTJqSw.png" /></figure><h3>Introduction</h3><p>In my previous article, we explored how Android decides which application should handle a Deep Link. We learned about <strong>Intents</strong>, <strong>Intent Filters</strong>, <strong>ACTION_VIEW</strong>, and how Android’s Intent Resolution system determines whether your application should be launched.</p><p>But that journey stopped at an important point.</p><p>Android had already launched our application.</p><p>The question is…</p><p><strong>Now what?</strong></p><p>Suppose a user taps:</p><pre>mmt://payment?status=SUCCESS</pre><p>Android receives the request.</p><p>Android resolves the Intent.</p><p>Android launches your application’s MainActivity.</p><p>But React Native applications don’t run inside MainActivity.</p><p>They run inside a JavaScript runtime.</p><p>So how does an Android Intent become something you can access using:</p><pre>Linking.getInitialURL()</pre><pre>or</pre><pre>Linking.addEventListener()</pre><p>That’s exactly what we’ll explore in this article.</p><h3>Two Completely Different Worlds</h3><p>One of the biggest misconceptions about React Native is that JavaScript somehow runs “inside Android.”</p><p>It doesn’t.</p><p>React Native actually consists of <strong>two independent runtimes</strong>.</p><pre>┌──────────────────────────────────────────┐<br>│           JavaScript Runtime             │<br>│                                          │<br>│ React Components                         │<br>│ Hooks                                    │<br>│ React Navigation                         │<br>│ Linking API                              │<br>│ Business Logic                           │<br>└──────────────────────────────────────────┘<br>                  ▲<br>                  │<br>           Bridge / JSI<br>                  │<br>                  ▼<br>┌──────────────────────────────────────────┐<br>│             Native Runtime               │<br>│                                          │<br>│ MainActivity                             │<br>│ Android Intent                           │<br>│ Camera                                   │<br>│ Bluetooth                                │<br>│ Android SDK                              │<br>└──────────────────────────────────────────┘</pre><p>These two runtimes execute independently.</p><p>JavaScript knows nothing about Android’s native objects.</p><p>Android knows nothing about JavaScript objects.</p><p>They simply speak different languages.</p><h3>Why React Native Doesn’t Receive URLs Directly</h3><p>Imagine Android launches your application because someone tapped:</p><pre>mmt://payment</pre><p>Android creates an object called:</p><pre>Intent</pre><p>Now imagine JavaScript trying to use that object.</p><pre>console.log(intent);</pre><p>What exactly is an Intent in JavaScript?</p><p>Nothing.</p><p>Because an Intent is a Java/Kotlin object.</p><p>It exists only inside Android’s runtime.</p><p>JavaScript has no understanding of Android classes.</p><p>This is exactly why React Native provides native modules.</p><p>Instead of exposing the Android Intent object,</p><p>the native side extracts only the information JavaScript needs.</p><p>For Deep Linking,</p><p>that information is usually the URL.</p><p>Instead of giving JavaScript</p><pre>Intent</pre><p>React Native gives it</p><pre>mmt://payment?status=SUCCESS</pre><p>A simple string.</p><p>Now JavaScript understands it perfectly.</p><h3>Meet the Linking Module</h3><p>Every React Native developer has written something like this.</p><pre>import { Linking } from &quot;react-native&quot;;</pre><p>At first glance,</p><p>it looks like a normal JavaScript module.</p><p>It isn’t.</p><p>The Linking module is actually a <strong>Native Module</strong>.</p><p>Just like:</p><ul><li>Camera</li><li>Clipboard</li><li>Permissions</li><li>AsyncStorage</li></ul><p>it has two sides.</p><pre>JavaScript<br>   ↓<br>Native Linking Module<br>   ↓<br>Android / iOS</pre><p>Whenever JavaScript calls</p><pre>Linking.getInitialURL()</pre><p>the request travels to the native Linking module.</p><p>The native module already knows which URL launched the application because Android delivered it earlier.</p><p>It simply passes that information back to JavaScript.</p><h3>The Cold Start Problem</h3><p>Let’s consider the first scenario.</p><p>The application is completely closed.</p><p>The user taps</p><pre>mmt://payment</pre><p>Here’s the sequence.</p><pre>User taps URL<br>        │<br>        ▼<br>Android OS<br>        │<br>        ▼<br>Launch MainActivity<br>        │<br>        ▼<br>React Native Starts<br>        │<br>        ▼<br>JavaScript Bundle Loads</pre><p>Notice something interesting.</p><p>When Android launches your application,</p><p><strong>JavaScript doesn’t exist yet.</strong></p><p>No components.</p><p>No React Navigation.</p><p>No hooks.</p><p>No EventEmitter.</p><p>Nothing.</p><p>So how can Android immediately send the URL to JavaScript?</p><p>It can’t.</p><p>Instead,</p><p>the native Linking module temporarily stores the launch URL.</p><p>Later,</p><p>after JavaScript has finished initializing,</p><p>your application asks:</p><pre>const url = await Linking.getInitialURL();</pre><p>The native module simply returns the stored URL.</p><p>This is why the API exists.</p><h3>Why Does getInitialURL() Return a Promise?</h3><p>A common interview question is:</p><blockquote><em>Why doesn’t </em><em>getInitialURL() simply return a string?</em></blockquote><p>The answer lies in React Native’s architecture.</p><p>Remember,</p><p>JavaScript and Android are different runtimes.</p><p>When JavaScript asks</p><pre>Linking.getInitialURL()</pre><p>it is communicating with native code.</p><p>That communication is asynchronous.</p><p>The native runtime may need time to respond.</p><p>Instead of blocking JavaScript,</p><p>React Native exposes the API as a Promise.</p><p>One request.</p><p>One response.</p><p>Exactly what Promises were designed for.</p><h3>Warm Start</h3><p>Now let’s consider another situation.</p><p>The application is already running.</p><p>The user is currently looking at</p><pre>Home Screen</pre><p>Now they tap</p><pre>mmt://orders/123</pre><p>Android receives another Intent.</p><p>But this time,</p><p>JavaScript already exists.</p><p>The application is already running.</p><p>Should we call</p><pre>Linking.getInitialURL()</pre><p>again?</p><p>No.</p><p>Because this isn’t the <strong>initial</strong> URL anymore.</p><p>It’s a completely new event.</p><h3>EventEmitter to the Rescue</h3><p>Instead of asking JavaScript to repeatedly check for new URLs,</p><p>React Native follows an event-driven architecture.</p><pre>Android<br>   ↓<br>Native Linking Module<br>   ↓<br>EventEmitter<br>   ↓<br>JavaScript Listener</pre><p>JavaScript simply registers a listener.</p><pre>useEffect(() =&gt; {<br>    const subscription = Linking.addEventListener(<br>        &quot;url&quot;,<br>        ({ url }) =&gt; {<br>            console.log(url);<br>        }<br>    );</pre><pre>    return () =&gt; subscription.remove();<br>}, []);</pre><p>Whenever Android delivers another Deep Link,</p><p>the native Linking module emits a new event.</p><p>Your JavaScript listener immediately receives it.</p><h3>Why EventEmitter?</h3><p>Imagine the application remains open for four hours.</p><p>During that time,</p><p>the user opens</p><pre>mmt://profile</pre><pre>mmt://orders</pre><pre>mmt://settings</pre><p>These aren’t launch events.</p><p>They’re runtime events.</p><p>Should JavaScript keep calling</p><pre>Linking.getInitialURL()</pre><p>every few seconds?</p><p>Of course not.</p><p>That would waste resources and make little sense.</p><p>Instead,</p><p>JavaScript registers one listener.</p><p>Every new Deep Link becomes an event.</p><p>This is exactly the type of problem EventEmitter was designed to solve.</p><h3>Why Does React Native Expose Two APIs?</h3><p>At first,</p><p>having both APIs can feel confusing.</p><pre>Linking.getInitialURL()</pre><p>and</p><pre>Linking.addEventListener()</pre><p>But they solve two entirely different problems.</p><p>APIPurposeLinking.getInitialURL()Returns the URL that launched the application during a cold start.Linking.addEventListener()Listens for new Deep Links while the application is already running.</p><p>One retrieves startup information.</p><p>The other listens for runtime events.</p><p>Once you understand the application lifecycle,</p><p>the design becomes obvious.</p><h3>Putting Everything Together</h3><p>The complete flow now looks like this.</p><pre>User taps Deep Link<br>          │<br>          ▼<br>Android Operating System<br>          │<br>          ▼<br>MainActivity<br>          │<br>          ▼<br>Native Linking Module<br>          │<br>          ▼<br>Bridge / JSI<br>          │<br>          ▼<br>JavaScript Linking API<br>          │<br>          ▼<br>React Navigation<br>          │<br>          ▼<br>Target Screen</pre><p>Notice something important.</p><p>React Native never receives the Android Intent directly.</p><p>The native Linking module acts as a translator.</p><p>It converts native Android objects into JavaScript-friendly data and exposes that data through well-designed APIs.</p><p>So far, we’ve explored how Android resolves Deep Links and how React Native’s Linking module delivers them to JavaScript.</p><p>But let’s bring everything together with a real-world example that millions of people use every day.</p><p>Imagine you’re booking a flight on MakeMyTrip.</p><p>You’ve selected your flight, entered passenger details, and reached the payment screen.</p><p>You choose <strong>Google Pay</strong>.</p><p>Within a few seconds, the payment completes, and you’re automatically taken back to MakeMyTrip, where your booking is confirmed.</p><p>From the user’s perspective, everything feels seamless.</p><p>But behind the scenes, multiple systems are working together.</p><p>Let’s follow that journey.</p><h3>Step 1 — MakeMyTrip Creates an Order</h3><p>Before Google Pay is even opened, MakeMyTrip contacts its backend.</p><pre>MakeMyTrip App<br>        │<br>        ▼<br>MakeMyTrip Backend</pre><p>The backend creates an order.</p><p>Example:</p><pre>Order ID : ORD12345</pre><pre>Amount : ₹5000</pre><pre>Status : PENDING</pre><p>At this point,</p><p><strong>no money has moved.</strong></p><p>The backend is simply saying,</p><blockquote><em>“I’m expecting a payment for this order.”</em></blockquote><h3>Step 2 — Launching Google Pay</h3><p>Now MakeMyTrip asks Android to open a UPI application.</p><p>Conceptually,</p><p>the native Android code creates an Intent.</p><pre>val intent = Intent(Intent.ACTION_VIEW)</pre><pre>intent.data = Uri.parse(&quot;upi://pay?...&quot;)</pre><pre>startActivity(intent)</pre><p>Notice something interesting.</p><p>The Intent doesn’t say</p><pre>Open Google Pay</pre><p>Instead,</p><p>it says</p><pre>I need an application capable of handling<br>a UPI payment.</pre><p>Android resolves the Intent,</p><p>shows available UPI applications if necessary,</p><p>and launches Google Pay.</p><pre>MakeMyTrip<br>  ↓<br>Android<br>  ↓<br>Google Pay</pre><h3>Step 3 — Payment Processing</h3><p>Once Google Pay opens,</p><p>React Native is no longer involved.</p><p>The payment happens entirely outside your application.</p><pre>Google Pay<br>   ↓<br> NPCI<br>   ↓<br>Customer Bank<br>   ↓<br>Merchant Bank</pre><p>This is where the actual money transfer occurs.</p><p>Notice something important.</p><p>The money is <strong>not</strong> transferred through Deep Linking.</p><p>Deep Linking plays no role in moving money.</p><p>Its responsibility comes later.</p><h3>Step 4 — Payment Completed</h3><p>Once the transaction finishes,</p><p>Google Pay receives a response.</p><p>Something similar to</p><pre>Status : SUCCESS</pre><pre>Transaction ID : TXN12345</pre><p>Now Google Pay needs to send the user back.</p><p>How does it know where to return?</p><p>Because MakeMyTrip previously provided a callback URL.</p><p>For example,</p><pre>mmt://payment</pre><p>or</p><pre>https://www.makemytrip.com/payment</pre><p>Google Pay simply asks Android</p><p>to open that URL.</p><h3>Step 5 — Android Delivers the Deep Link</h3><p>Now everything we’ve learned in the previous sections comes together.</p><pre>Google Pay<br>        │<br>        ▼<br>Android Operating System<br>        │<br>Intent Resolution<br>        │<br>        ▼<br>MainActivity<br>        │<br>        ▼<br>React Native Linking Module<br>        │<br>        ▼<br>Bridge / JSI<br>        │<br>        ▼<br>JavaScript</pre><p>If the application was already running,</p><p>React Native emits</p><pre>Linking.addEventListener(&quot;url&quot;)</pre><p>If the application had been terminated,</p><p>JavaScript later retrieves the launch URL using</p><pre>await Linking.getInitialURL()</pre><p>The important point is this:</p><p>The Deep Link only returns the user to the application.</p><p>It does <strong>not</strong> prove that payment succeeded.</p><h3>Deep Link ≠ Payment Success</h3><p>This is one of the biggest misconceptions developers have when first implementing payment flows.</p><p>Receiving</p><pre>mmt://payment?status=SUCCESS</pre><p>does <strong>not</strong> automatically mean</p><p>the payment is genuine.</p><p>Imagine a malicious application creating</p><pre>mmt://payment?status=SUCCESS</pre><p>and opening it directly.</p><p>If MakeMyTrip trusted the Deep Link alone,</p><p>anyone could fake a successful payment.</p><p>That would be a serious security vulnerability.</p><p>Production applications never trust information coming directly from another application.</p><h3>The Real Source of Truth</h3><p>Instead,</p><p>the Deep Link is only used to resume the user experience.</p><p>After returning to the application,</p><p>React Native immediately contacts the backend.</p><pre>React Native App<br>        │<br>      HTTPS<br>        ▼<br>MakeMyTrip Backend</pre><p>The backend now verifies the transaction.</p><p>Depending on the payment provider,</p><p>it may contact</p><pre>Payment Gateway<br> or<br>NPCI<br> or<br>Bank</pre><p>to confirm that the transaction actually exists.</p><p>Only after successful verification</p><p>does the backend update</p><pre>Order ID : ORD12345</pre><pre>Status : SUCCESS</pre><p>Finally,</p><p>the backend responds</p><pre>Booking Confirmed</pre><p>Now,</p><p>and only now,</p><p>does MakeMyTrip display</p><pre>🎉 Booking Successful</pre><h3>The Complete Production Flow</h3><p>Everything we’ve discussed throughout this series can now be represented in one diagram.</p><pre>User Books Flight<br>        │<br>        ▼<br>  MakeMyTrip<br>        │<br>Create Order<br>        ▼<br>   Backend<br>        │<br>Status = PENDING<br>        ▼<br>  Google Pay<br>        │<br>        ▼<br>      NPCI<br>        │<br>        ▼<br>      Banks<br>        │<br>Money Transfer<br>        ▼<br>  Google Pay<br>        │<br>Callback Deep Link<br>        ▼<br>    Android<br>        │<br>  MainActivity<br>        ▼<br>React Native Linking Module<br>        │<br>Bridge / JSI<br>        ▼<br>   JavaScript<br>        │<br>Backend Verification<br>        ▼<br>Booking Confirmed</pre><p>Notice something interesting.</p><p>The Deep Link appears almost at the end of the process.</p><p>It’s simply a mechanism for returning the user to the application.</p><p>The real business decision — whether the booking should be confirmed — is made only after backend verification.</p><h3>Security Best Practice</h3><p>One important lesson I took away while learning Deep Linking is this:</p><blockquote><strong><em>Never trust data coming directly from another application.</em></strong></blockquote><p>Deep Links are excellent for navigation.</p><p>They’re excellent for resuming application state.</p><p>They’re excellent for passing contextual information.</p><p>But they should never be treated as the source of truth for security-sensitive operations like payments.</p><p>For anything involving money, authentication, or user identity,</p><p>the backend should always perform independent verification.</p><h3>Final Thoughts</h3><p>Throughout these two articles, we started with a simple question:</p><blockquote><strong><em>What actually happens when a user taps a Deep Link?</em></strong></blockquote><p>The answer turned out to be much more interesting than simply calling Linking.getInitialURL().</p><p>We explored how Android resolves Intents, how React Native bridges native information into JavaScript, why the Linking module exposes both Promises and EventEmitters, and finally how production applications use Deep Linking as one small part of a much larger payment workflow.</p><p>Understanding these internals completely changed how I think about React Native.</p><p>Instead of seeing Deep Linking as just another API, I now see it as a collaboration between the operating system, native code, JavaScript, and backend services.</p><p>And that’s one of the things I enjoy most about React Native — every high-level API has a fascinating story underneath.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=466a6e23a50a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deep Linking in React Native: What Actually Happens Under the Hood?]]></title>
            <link>https://medium.com/@siddhantshelake/deep-linking-in-react-native-what-actually-happens-under-the-hood-eb66c8a0e608?source=rss-a39b98bdb441------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb66c8a0e608</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[deep-linking]]></category>
            <category><![CDATA[intentfilter]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Siddhant Shelake]]></dc:creator>
            <pubDate>Wed, 15 Jul 2026 05:31:15 GMT</pubDate>
            <atom:updated>2026-07-15T05:31:15.194Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_yGiBJDy25MhV7VOGbuybQ.png" /></figure><p>A few days ago, I was booking a flight on MakeMyTrip.</p><p>Everything was straightforward. I selected my flight, entered the passenger details, and reached the payment page. Like many people, I chose Google Pay as my payment method.</p><p>Within a second, Google Pay opened. I authenticated the payment, completed the transaction, and almost instantly I was back on MakeMyTrip looking at the booking confirmation screen.</p><p>It all felt effortless.</p><p>No loading screens.</p><p>No manual switching between apps.</p><p>No “Go back to MakeMyTrip” button.</p><p>Everything just… worked.</p><p>At first glance, it seems like a simple user experience.</p><p>But as a React Native developer, a completely different question came to my mind.</p><blockquote><strong><em>Who actually brought me back to MakeMyTrip?</em></strong></blockquote><p>Was it Google Pay?</p><p>Was it React Native?</p><p>Was it Android?</p><p>Or was it some hidden magic happening behind the scenes?</p><p>The more I thought about it, the more interesting the question became.</p><p>Because if you’ve ever implemented Deep Linking in React Native, you’ve probably written something like this:</p><pre>const url = await Linking.getInitialURL();</pre><pre>Linking.addEventListener(&quot;url&quot;, handler);</pre><p>or maybe you’ve configured React Navigation with a linking configuration and moved on.</p><p>The API is simple.</p><p>Almost <em>too</em> simple.</p><p>But those two lines hide an incredible amount of work happening underneath.</p><p>And that’s where I realized something.</p><p>Most articles teach <strong>how to use Deep Linking</strong>.</p><p>Very few explain <strong>how Deep Linking actually works</strong>.</p><p>This article isn’t about adding a few lines to AndroidManifest.xml or Info.plist.</p><p>Instead, we’ll answer questions like:</p><ul><li>Why doesn’t React Native receive the URL directly?</li><li>What exactly is an Android Intent?</li><li>Why do we need Linking.getInitialURL() <strong>and</strong> Linking.addEventListener()?</li><li>Why does React Native internally use an EventEmitter?</li><li>How does Android know which app should open a URL?</li><li>What actually happens when you return from Google Pay to MakeMyTrip?</li></ul><p>By the end of this article, you’ll understand Deep Linking not as a React Native API, but as a collaboration between the operating system, native code, and the JavaScript runtime.</p><h3>The Biggest Misconception</h3><p>When I first started learning Deep Linking, I imagined something like this.</p><pre>User taps a URL<br>        │<br>        ▼<br>React Native<br>        │<br>        ▼<br>Navigate to Screen</pre><p>It seems logical.</p><p>After all, we use the React Native Linking API.</p><p>So React Native must be receiving the URL directly…</p><p>Right?</p><p>Not exactly.</p><p>The actual flow looks more like this.</p><pre>User taps a URL<br>        │<br>        ▼<br>Android / iOS Operating System<br>        │<br>        ▼<br>Native Application<br>(MainActivity / AppDelegate)<br>        │<br>        ▼<br>React Native Linking Module<br>        │<br>        ▼<br>JavaScript Runtime<br>        │<br>        ▼<br>React Navigation<br>        │<br>        ▼<br>Target Screen</pre><p>Notice something interesting.</p><p><strong>React Native isn’t at the top of this diagram.</strong></p><p>In fact, React Native doesn’t even know a URL exists until the operating system decides to launch (or resume) your application.</p><p>That small detail changes the way you think about Deep Linking entirely.</p><h3>Let’s Go Back to MakeMyTrip</h3><p>Let’s replay our payment flow.</p><pre>MakeMyTrip<br>      │<br>      ▼<br>Google Pay<br>      │<br>User completes payment<br>      ▼<br>Google Pay finishes<br>      │<br>      ▼<br>MakeMyTrip opens again</pre><p>It almost feels as if Google Pay is directly talking to React Native.</p><p>But that’s not what happens.</p><p>Instead, Android acts like a traffic controller.</p><pre>MakeMyTrip<br>      │<br>      ▼<br>Android<br>      │<br>Launch Google Pay<br>      ▼<br>Google Pay<br>      │<br>Payment Complete<br>      ▼<br>Android<br>      │<br>Resume MakeMyTrip<br>      ▼<br>React Native</pre><p>Notice something important.</p><p>Neither application directly controls the other.</p><p>Both applications communicate <strong>through the operating system</strong>.</p><p>Android decides:</p><ul><li>Which application should open.</li><li>When it should open.</li><li>Which information should be delivered.</li><li>Whether an existing application should be resumed or a new one should be launched.</li></ul><p>React Native simply reacts to what the operating system has already decided.</p><h3>Why This Matters</h3><p>Understanding this architecture explains several React Native APIs that often confuse developers.</p><p>For example…</p><p>Why do we have this?</p><pre>await Linking.getInitialURL();</pre><p>And also this?</p><pre>Linking.addEventListener(&quot;url&quot;, callback);</pre><p>If both are related to Deep Linking…</p><p>Why do we need two APIs?</p><p>Similarly…</p><p>Why can Android open Google Pay, PhonePe, Paytm, or BHIM using the exact same payment request?</p><p>How does Android decide which application should handle a URL?</p><p>How does React Native receive that information if JavaScript wasn’t even running when the user tapped the link?</p><p>These aren’t just interview questions.</p><p>They’re questions that help you understand how React Native fits into the mobile ecosystem.</p><h3>What We’ll Build Together</h3><p>Throughout this article, we’ll follow a single real-world example.</p><p>A user books a flight on MakeMyTrip.</p><p>They pay using Google Pay.</p><p>The payment completes.</p><p>The user returns to MakeMyTrip.</p><p>Using this simple scenario, we’ll explore everything happening under the hood.</p><p>We’ll cover:</p><ul><li>What Deep Linking actually is.</li><li>Android Intents and Intent Filters.</li><li>Why the operating system always receives the URL first.</li><li>How React Native’s Linking module works internally.</li><li>Cold Start vs Warm Start.</li><li>Why React Native uses both Promises and EventEmitters.</li><li>How payment applications communicate with merchant applications.</li><li>Why production apps never trust a Deep Link alone.</li><li>How the same concepts work on iOS using Universal Links.</li></ul><p>By the end, you won’t just know <strong>how</strong> to implement Deep Linking.</p><p>You’ll understand <strong>why it works</strong>.</p><p>And once you understand that, debugging Deep Linking issues — or discussing them in interviews — becomes much easier.</p><h3>What is Deep Linking?</h3><p>At this point, we know that React Native isn’t the first component that receives a URL. The operating system is.</p><p>But before we dive deeper into Android Intents and React Native internals, let’s answer the most fundamental question.</p><blockquote><strong><em>What exactly is Deep Linking?</em></strong></blockquote><p>Most definitions you’ll find online sound something like this:</p><blockquote>“Deep Linking is a mechanism that allows a URL to open a specific screen inside a mobile application.”</blockquote><p>While technically correct, that definition doesn’t explain <em>why</em> Deep Linking exists or <em>why</em> almost every modern mobile application depends on it.</p><p>Let’s look at it from a user’s perspective.</p><h3>Life Without Deep Linking</h3><p>Imagine you’re using an e-commerce application.</p><p>Your friend sends you a product.</p><pre>Wireless Headphones</pre><p>Without Deep Linking, tapping the link would simply open the application.</p><pre>App Opens<br>↓<br>Home Screen</pre><p>Now the user has to manually navigate through the application.</p><pre>Home<br>↓<br>Search<br>↓<br>Type Product Name<br>↓<br>Select Product<br>↓<br>Finally Reach Product Page</pre><p>This creates unnecessary friction.</p><p>The application knows exactly which product the user wanted to see.</p><p>So why make them search again?</p><h3>Life With Deep Linking</h3><p>Now imagine the same scenario with Deep Linking enabled.</p><p>Your friend shares this URL.</p><pre>myshop://products/98765</pre><p>or</p><pre>https://myshop.com/products/98765</pre><p>Instead of opening the home screen, the application immediately navigates to</p><pre>Product Details</pre><pre>Product ID = 98765</pre><p>No searching.</p><p>No additional taps.</p><p>The user lands exactly where they intended to go.</p><p>That’s the essence of Deep Linking.</p><p>Instead of opening an application,</p><p>it opens <strong>a destination inside the application</strong>.</p><h3>Think of It Like Google Maps</h3><p>Imagine someone tells you,</p><blockquote><em>“Come to Mumbai.”</em></blockquote><p>That’s useful.</p><p>But Mumbai is huge.</p><p>Now imagine they send you the exact location.</p><pre>Starbucks, Bandra West</pre><p>You don’t have to search.</p><p>Google Maps takes you directly there.</p><p>Deep Linking works in exactly the same way.</p><p>Instead of opening the application,</p><p>it opens a <strong>specific destination</strong> inside the application.</p><h3>Where Do We Use Deep Links?</h3><p>Once you start noticing them, you’ll realize they’re everywhere.</p><p>When you click a product link on Amazon,</p><p>you don’t land on the home screen.</p><p>You land directly on the product.</p><p>When someone sends you an Instagram profile,</p><p>the Instagram application opens directly on that profile.</p><p>When you receive an invitation to join a WhatsApp group,</p><p>the application opens directly to the invitation screen.</p><p>When you complete a payment using Google Pay from MakeMyTrip,</p><p>you’re returned directly to the booking confirmation screen.</p><p>Every one of these experiences is powered by Deep Linking.</p><h3>Different Types of Deep Links</h3><p>Although they all achieve the same goal, not all Deep Links are implemented in the same way.</p><p>There are three primary approaches used in modern mobile applications.</p><h3>1. Custom URL Schemes</h3><p>This is the simplest form of Deep Linking.</p><p>Instead of using an HTTP URL,</p><p>the application defines its own custom scheme.</p><p>For example,</p><pre>mmt://payment</pre><p>or</p><pre>spotify://album/12345</pre><p>or</p><pre>myapp://profile/42</pre><p>Notice something interesting.</p><p>The first part of the URL isn’t <strong>https</strong>.</p><p>It’s a custom identifier chosen by the application developer.</p><p>Android and iOS can be configured to recognize these schemes.</p><p>When the operating system sees</p><pre>mmt://</pre><p>it knows that the MakeMyTrip application has registered itself as the handler for that scheme.</p><p>If the application is installed,</p><p>Android launches it immediately.</p><h3>Advantages</h3><ul><li>Extremely easy to configure</li><li>Doesn’t require owning a website</li><li>Great for communication between applications</li></ul><h3>Limitations</h3><p>If the application isn’t installed,</p><p>the link usually fails.</p><p>Another limitation is uniqueness.</p><p>Since anyone can create a custom scheme,</p><p>two applications could accidentally register the same identifier.</p><p>Although operating systems have ways of handling such conflicts,</p><p>this isn’t ideal for production-grade applications.</p><h3>2. Universal Links (iOS)</h3><p>Apple introduced Universal Links to solve many of the limitations of custom schemes.</p><p>Instead of inventing a new URL format,</p><p>applications use normal HTTPS URLs.</p><p>For example,</p><pre>https://www.myapp.com/orders/123</pre><p>At first glance, this looks like an ordinary website.</p><p>But if the application is installed,</p><p>iOS opens the application instead of Safari.</p><p>If the application isn’t installed,</p><p>the same URL simply opens in the browser.</p><p>This provides a much smoother user experience.</p><p>The user never encounters a broken link.</p><h3>3. Android App Links</h3><p>Android provides a very similar feature called <strong>App Links</strong>.</p><p>The URLs also use HTTPS.</p><pre>https://www.myapp.com/orders/123</pre><p>The difference is that Android verifies that your application actually owns the domain before automatically opening it.</p><p>This prevents another application from claiming ownership of someone else’s website.</p><p>From a user’s perspective,</p><p>Universal Links and Android App Links behave almost identically.</p><p>If the application exists,</p><p>open the application.</p><p>Otherwise,</p><p>open the website.</p><h3>Which One Should You Use?</h3><p>Each approach solves a different problem.</p><h3>Custom URL Schemes</h3><p>Ideal when:</p><ul><li>Communicating between applications.</li><li>Internal enterprise applications.</li><li>Quick prototypes.</li><li>Applications without a public website.</li></ul><h3>Universal Links / Android App Links</h3><p>Ideal when:</p><ul><li>Building production applications.</li><li>Public consumer applications.</li><li>Marketing campaigns.</li><li>Email links.</li><li>SMS links.</li><li>QR codes.</li><li>Product sharing.</li><li>Authentication flows.</li></ul><p>Because they gracefully fall back to the website when the application isn’t installed, they’re considered the preferred solution for modern mobile applications.</p><h3>Before We Move On…</h3><p>At this point, we understand <strong>what</strong> Deep Linking is.</p><p>We also understand the different ways an application can expose Deep Links.</p><p>But one important question still remains.</p><p>When a user taps</p><pre>https://www.myapp.com/orders/123</pre><p><strong>How does Android actually know that <em>your</em> application should open instead of another one?</strong></p><p>Does React Native somehow intercept the URL?</p><p>Does Chrome talk directly to your JavaScript?</p><p>Or is something else happening behind the scenes?</p><p>To answer that, we need to leave React Native for a moment and step into the Android operating system itself.</p><p>In the next section, we’ll explore one of the most important concepts in Android development — <strong>Intents</strong> and <strong>Intent Filters</strong> — and see how Android decides which application should handle a Deep Link before React Native even knows the URL exists.</p><h3>How Android Decides Which App Should Open Your Link</h3><p>In the previous section, we learned what Deep Linking is and explored different types of links.</p><p>But we still haven’t answered one important question.</p><p>Suppose I tap this URL from Chrome.</p><pre>mmt://payment</pre><p>How does Android know that <strong>MakeMyTrip</strong> should open?</p><p>How does it know <strong>Google Pay</strong> shouldn’t open?</p><p>Or even <strong>Instagram</strong>?</p><p>The answer lies in one of Android’s most fundamental concepts:</p><blockquote><strong><em>Intents</em></strong></blockquote><p>Understanding Intents completely changes the way you think about Deep Linking.</p><h3>What is an Intent?</h3><p>Think of an Intent as a message.</p><p>Not a React Native message.</p><p>Not a JavaScript object.</p><p>An Android message.</p><p>Whenever one application wants another application (or Android itself) to perform an action, it creates an Intent.</p><p>For example,</p><p>Chrome wants to open a URL.</p><pre>Chrome<br>  ↓<br>Intent<br>  ↓<br>Android OS</pre><p>A camera application wants to capture a photo.</p><pre>Camera<br>  ↓<br>Intent<br>  ↓<br>Android OS</pre><p>MakeMyTrip wants to open Google Pay.</p><pre>MakeMyTrip<br>   ↓<br> Intent<br>   ↓<br>Android OS</pre><p>Instead of talking directly to another application, Android applications communicate through Intents.</p><p>Think of Android as a receptionist.</p><p>Instead of saying,</p><blockquote><em>“Google Pay, please open.”</em></blockquote><p>Applications say,</p><blockquote><em>“Android, here’s what I want to do.”</em></blockquote><p>Android decides who should handle the request.</p><h3>Explicit vs Implicit Intents</h3><p>Android supports two types of Intents.</p><p>Understanding this difference is extremely important.</p><h3>Explicit Intent</h3><p>An Explicit Intent already knows exactly which component should open.</p><p>Imagine calling your friend directly.</p><pre>You<br>  ↓<br>Call John<br>  ↓<br>John Answers</pre><p>There’s no searching involved.</p><p>The destination is already known.</p><p>Conceptually,</p><pre>Intent(this, PaymentActivity::class.java)</pre><p>Android doesn’t need to decide anything.</p><p>It simply opens the specified Activity.</p><h3>Implicit Intent</h3><p>Deep Linking uses <strong>Implicit Intents</strong>.</p><p>Instead of saying,</p><blockquote><em>Open Google Pay.</em></blockquote><p>The application says,</p><blockquote><em>I need someone who can handle this URL.</em></blockquote><p>Example:</p><pre>val intent = Intent(Intent.ACTION_VIEW)</pre><pre>intent.data = Uri.parse(&quot;upi://pay?...&quot;)</pre><pre>startActivity(intent)</pre><p>Notice something interesting.</p><p>There’s no mention of</p><p>Google Pay.</p><p>Or PhonePe.</p><p>Or Paytm.</p><p>Android receives the request and starts searching.</p><pre>Intent<br>  ↓<br>Android<br>  ↓<br>Who can handle this?</pre><p>This process is called <strong>Intent Resolution</strong>.</p><h3>ACTION_VIEW</h3><p>If you look at almost every Deep Linking example,</p><p>you’ll find this line.</p><pre>Intent.ACTION_VIEW</pre><p>But what does it actually mean?</p><p>Every Intent contains an <strong>Action</strong>.</p><p>Think of an Action as</p><blockquote><em>“What does the sender want to do?”</em></blockquote><p>For Deep Linking,</p><p>the answer is</p><blockquote><em>View or open something.</em></blockquote><p>For example,</p><pre>https://google.com</pre><p>Open it.</p><pre>mmt://payment</pre><p>Open it.</p><pre>upi://pay</pre><p>Open it.</p><p>That’s why we use</p><pre>Intent.ACTION_VIEW</pre><p>Android supports many other Actions.</p><pre>ACTION_SEND<br>   ↓<br>Share something</pre><pre>ACTION_DIAL<br>   ↓<br>Open Phone Dialer</pre><pre>ACTION_PICK<br>    ↓<br>Pick an Image</pre><p>For Deep Linking,</p><p>we’re interested in only one.</p><pre>ACTION_VIEW</pre><h3>Intent Filters</h3><p>Now we know how an application <strong>sends</strong> an Intent.</p><p>But how does another application receive it?</p><p>That’s where <strong>Intent Filters</strong> come in.</p><p>An Intent Filter is simply a declaration inside your application’s</p><pre>AndroidManifest.xml</pre><p>telling Android,</p><blockquote><em>“I know how to handle requests that look like this.”</em></blockquote><p>For example,</p><pre>&lt;intent-filter&gt;<br>    &lt;action android:name=&quot;android.intent.action.VIEW&quot;/&gt;<br>    &lt;category android:name=&quot;android.intent.category.DEFAULT&quot;/&gt;<br>    &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot;/&gt;<br>    &lt;data android:scheme=&quot;mmt&quot;/&gt;<br>&lt;/intent-filter&gt;</pre><p>This doesn’t send an Intent.</p><p>It simply advertises your application’s capabilities.</p><p>Think of it as placing a sign outside your shop.</p><blockquote><em>“We repair laptops.”</em></blockquote><p>Android walks around checking every shop until it finds one matching the customer’s request.</p><h3>ACTION is Only One Piece</h3><p>Suppose Android receives</p><pre>mmt://payment</pre><p>It doesn’t immediately launch MakeMyTrip.</p><p>Instead, it starts comparing the Intent against every installed application’s Intent Filters.</p><p>Think of it like this.</p><pre>Incoming Intent<br>    ↓<br>ACTION = VIEW<br><br>    ↓<br>Find matching applications</pre><p>Every application that declares</p><pre>ACTION_VIEW</pre><p>becomes a potential candidate.</p><p>But that’s still not enough.</p><p>Android continues checking additional rules.</p><h3>Category.DEFAULT</h3><p>This one confuses many Android developers.</p><p>The</p><pre>DEFAULT</pre><p>category simply tells Android,</p><blockquote><em>This Activity is willing to receive normal implicit Intents.</em></blockquote><p>Without it,</p><p>Android may ignore your Activity during Intent Resolution.</p><p>Think of it as checking a box saying,</p><blockquote><em>Yes, I can receive public requests.</em></blockquote><h3>Category.BROWSABLE</h3><p>This category is specifically for Deep Linking.</p><p>It tells Android,</p><blockquote><em>External applications like Chrome, Gmail, WhatsApp, QR scanners, or email clients are allowed to launch this Activity.</em></blockquote><p>Without</p><pre>BROWSABLE</pre><p>Chrome cannot open your Activity.</p><p>Even if everything else matches.</p><p>This small line is what allows users to tap links from outside your application.</p><h3>URI Matching</h3><p>The</p><pre>&lt;data&gt;</pre><p>tag tells Android which URLs your application supports.</p><p>For example,</p><pre>&lt;data android:scheme=&quot;mmt&quot;/&gt;</pre><p>means</p><p>Only URLs beginning with</p><pre>mmt://</pre><p>should reach this Activity.</p><p>But Android can match much more than just the scheme.</p><p>Example.</p><pre>&lt;data android:scheme=&quot;https&quot;<br>  android:host=&quot;www.makemytrip.com&quot;<br>  android:pathPrefix=&quot;/payment&quot;/&gt;</pre><p>Now Android checks</p><p>three different things.</p><pre>Scheme<br>  ↓<br> Host<br>  ↓<br> Path</pre><p>Suppose the incoming URL is</p><pre>https://www.makemytrip.com/payment/success</pre><p>Comparison</p><pre>Scheme</pre><pre>https</pre><pre>↓</pre><pre>Match ✅</pre><pre>Host</pre><pre>www.makemytrip.com</pre><pre>↓</pre><pre>Match ✅</pre><pre>Path</pre><pre>/payment</pre><pre>↓</pre><pre>Match ✅</pre><p>Everything matches.</p><p>Launch the application.</p><p>Now suppose the URL is</p><pre>https://www.google.com/payment</pre><p>Host becomes</p><pre>google.com</pre><p>Host doesn’t match.</p><p>Android ignores your application.</p><h3>Android’s Intent Resolution Process</h3><p>At this point, we finally have all the pieces.</p><p>Let’s see the complete journey.</p><p>Suppose a user taps</p><pre>mmt://payment</pre><p>inside Chrome.</p><p>Here’s what Android does.</p><pre>Chrome<br>    │<br>    ▼<br>Creates Intent<br>(ACTION_VIEW)<br>    │<br>    ▼<br>Android Operating System<br>    │<br>    ▼<br>Reads Intent<br>    │<br>    ▼<br>Scans Installed Applications<br>    │<br>    ▼<br>Compares Intent Filters<br>    │<br>    ├── ACTION<br>    ├── CATEGORY<br>    ├── SCHEME<br>    ├── HOST<br>    └── PATH<br>    │<br>    ▼<br>Matching Activity Found<br>    │<br>    ▼<br>Launch MainActivity</pre><p>Notice something remarkable.</p><p><strong>React Native hasn’t participated anywhere in this process.</strong></p><p>Everything you’ve seen so far happens entirely inside the Android operating system.</p><p>Only after Android decides which application should open does React Native finally become part of the story.</p><p>And that’s exactly what we’ll explore next.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb66c8a0e608" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Podfile in React Native iOS: The Bridge Between npm and Native Dependencies ]]></title>
            <link>https://medium.com/@siddhantshelake/understanding-podfile-in-react-native-ios-the-bridge-between-npm-and-native-dependencies-7a30ff9839ec?source=rss-a39b98bdb441------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a30ff9839ec</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[cocoapods]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Siddhant Shelake]]></dc:creator>
            <pubDate>Thu, 09 Jul 2026 16:20:38 GMT</pubDate>
            <atom:updated>2026-07-09T16:20:38.409Z</atom:updated>
            <content:encoded><![CDATA[<p>When working with React Native, installing a JavaScript package is usually simple:</p><pre>npm install package-name</pre><p>But when that package contains iOS native code, another dependency manager becomes involved:</p><p><strong>CocoaPods</strong></p><p>And the file controlling those native dependencies is:</p><p>📦 <strong>Podfile</strong></p><p>For React Native developers, understanding Podfile helps debug:</p><ul><li>iOS build failures</li><li>Native module linking issues</li><li>Dependency conflicts</li><li>Xcode errors</li></ul><p>Let’s understand how it works.</p><h3>1. CocoaPods vs npm — Similar Concepts, Different Ecosystem</h3><p>React Native developers already understand npm.</p><p>CocoaPods follows a very similar idea.</p><p>Mapping both worlds:</p><p>package.json<br>→ Podfile</p><p>npm install<br>→ pod install</p><p>package-lock.json<br>→ Podfile.lock</p><p>node_modules/<br>→ Pods/</p><p>The purpose is the same:</p><p>Declare dependencies → Resolve versions → Download code → Use inside the app</p><p>But CocoaPods has one extra step.</p><p>After running:</p><pre>pod install</pre><p>CocoaPods generates:</p><pre>YourApp.xcworkspace</pre><p>This workspace connects:</p><ul><li>Your app project</li><li>Installed Pods project</li></ul><p>After installing Pods, always open:</p><p>✅ .xcworkspace</p><p>Not:</p><p>❌ .xcodeproj</p><p>Otherwise Xcode cannot see linked native dependencies and your build may fail.</p><h3>2. Why Does Podfile Syntax Look Different?</h3><p>A Podfile is not Swift.</p><p>It is written in:</p><p>Ruby 💎</p><p>Why?</p><p>Because CocoaPods itself is a Ruby-based tool.</p><p>That’s why you see syntax like:</p><pre>do<br>end</pre><p>or:</p><pre>require_relative</pre><p>The Podfile is basically a Ruby script describing how native dependencies should be configured.</p><h3>3. Why Modern React Native Podfiles Use Node Resolution</h3><p>Older Podfiles commonly used:</p><pre>require_relative &#39;../node_modules/react-native/scripts/react_native_pods&#39;</pre><p>Simple.</p><p>But it assumes:</p><pre>project<br> ├── ios<br> └── node_modules</pre><p>Modern projects can be different:</p><p>Example:</p><p>Monorepos.</p><pre>repo<br> ├── node_modules<br> └── apps<br>      └── mobile<br>           └── ios</pre><p>The old relative path breaks.</p><p>Modern React Native uses:</p><pre>Pod::Executable.execute_command(&#39;node&#39;, ...)</pre><p>Why?</p><p>Because Node’s require.resolve() finds the real installed package location.</p><p>Even if node_modules is hoisted somewhere else.</p><p>This makes React Native work better with:</p><ul><li>Monorepos</li><li>Yarn workspaces</li><li>Complex project structures</li></ul><h3>4. What Does platform :ios Mean?</h3><p>You might see:</p><pre>platform :ios, min_ios_version_supported</pre><p>This defines the minimum iOS version your app supports.</p><p>Example:</p><p>Your app supports:</p><p>iOS 15+</p><p>React Native provides this value from its own scripts.</p><p>Why?</p><p>Because every React Native version has a minimum iOS requirement.</p><p>It prevents accidentally targeting an unsupported iOS version.</p><h3>5. Static Libraries vs Dynamic Frameworks</h3><p>CocoaPods can link native dependencies in two ways.</p><h3>Static Linking (Default)</h3><p>Pods are compiled into static libraries.</p><p>They become part of your final app binary.</p><p>This is React Native’s default behavior.</p><p>Example:</p><pre>App Binary<br> ├── React Native<br> ├── Yoga<br> ├── Native Modules</pre><p>Everything is packed together.</p><h3>Dynamic Frameworks</h3><p>Enabled using:</p><pre>use_frameworks!</pre><p>Each dependency becomes a separate:</p><pre>.framework</pre><p>and is loaded by iOS at runtime.</p><p>The Podfile commonly controls this using:</p><pre>USE_FRAMEWORKS</pre><p>environment configuration.</p><h3>6. What Does use_native_modules! Do?</h3><p>This is React Native autolinking.</p><p>When you install:</p><pre>npm install react-native-device-info</pre><p>You do not manually edit Xcode anymore.</p><p>Why?</p><p>Because:</p><pre>use_native_modules!</pre><p>scans your dependencies.</p><p>It checks:</p><p>package.json<br>↓<br>Installed libraries<br>↓<br>.podspec files<br>↓<br>Automatically links native modules</p><p>This is CocoaPods-level autolinking.</p><p>On the AppDelegate side, the related concept is:</p><p>RCTAppDependencyProvider</p><p>Same pipeline.</p><p>Different layer.</p><h3>7. What Does use_react_native! Install?</h3><p>React Native itself has native code.</p><p>The JS package:</p><pre>node_modules/react-native</pre><p>contains iOS dependencies.</p><p>use_react_native! connects them into Xcode.</p><p>It installs things like:</p><ul><li>React-Core</li><li>Yoga</li><li>Hermes</li><li>Folly</li></ul><p>Without this, your native iOS project would not know how to run React Native.</p><p>Think of it as:</p><p>npm installs React Native for JavaScript.</p><p>Podfile installs React Native for iOS.</p><h3>8. Why Does Podfile Need post_install?</h3><p>After:</p><pre>pod install</pre><p>CocoaPods creates the Pods Xcode project.</p><p>Sometimes generated settings need adjustment.</p><p>For that we use:</p><pre>post_install do |installer|<br>end</pre><p>React Native provides:</p><pre>react_native_post_install(...)</pre><p>It automatically applies required fixes:</p><ul><li>Compiler settings</li><li>Build flags</li><li>Deployment targets</li><li>Xcode compatibility fixes</li></ul><p>Without manually editing every Pod.</p><h3>Final Thoughts</h3><p>For React Native developers, the Podfile is not just an installation script.</p><p>It is the connection point between:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XUbel-H6f5ERug4TEqkdgg.png" /></figure><p>Understanding it helps solve:</p><ul><li>Pod install failures</li><li>Native module issues</li><li>Xcode linking errors</li><li>Build configuration problems</li></ul><p>A strong React Native engineer should understand what happens beyond npm install.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a30ff9839ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Info.plist in React Native iOS: The File That Controls Your App Before Code Runs ]]></title>
            <link>https://medium.com/@siddhantshelake/understanding-info-plist-in-react-native-ios-the-file-that-controls-your-app-before-code-runs-3b8140049676?source=rss-a39b98bdb441------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b8140049676</guid>
            <category><![CDATA[react-native-ios]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[ios-development]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[infoplist]]></category>
            <dc:creator><![CDATA[Siddhant Shelake]]></dc:creator>
            <pubDate>Wed, 08 Jul 2026 16:04:09 GMT</pubDate>
            <atom:updated>2026-07-08T16:04:58.072Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s-nYS9N_xQ7-w8PPB7BPdQ.png" /></figure><p>When working with React Native, we spend most of our time inside JavaScript, TypeScript, and sometimes native Swift/Objective-C code.</p><p>But there is one important iOS file that silently controls a lot of your app behavior before your React Native app even starts:</p><p><strong>Info.plist</strong></p><p>If you are preparing for React Native interviews or debugging native iOS issues, understanding Info.plist is extremely important.</p><p>Let’s break it down from a React Native developer’s perspective.</p><h3>1. What is Info.plist?</h3><p>Info.plist (Information Property List) is a metadata/configuration file used by iOS.</p><p>It is usually stored as XML (or binary plist) and contains key-value information that iOS reads before or during app launch.</p><p>Examples:</p><ul><li>App name</li><li>App version</li><li>Permissions</li><li>URL schemes</li><li>Supported orientations</li><li>Security configurations</li></ul><p>A very important difference:</p><p>Info.plist → Declarative configuration<br>AppDelegate.swift → Executable code</p><p>Info.plist does not contain functions, conditions, or business logic.</p><p>For example:</p><p>AppDelegate.swift can say:</p><p>“Run this code when the app launches.”</p><p>Info.plist says:</p><p>“These are the rules and configurations this app supports.”</p><h3>2. iOS Permission Keys</h3><p>When your React Native app accesses native resources like:</p><ul><li>Camera</li><li>Location</li><li>Photos</li><li>Microphone</li></ul><p>iOS requires permission descriptions inside Info.plist.</p><p>The naming pattern is:</p><p>NS&lt;Resource&gt;UsageDescription</p><p>Examples:</p><p>NSCameraUsageDescription</p><p>Used when accessing the camera.</p><p>NSLocationWhenInUseUsageDescription</p><p>Used when requesting location access while using the app.</p><p>The value you provide here is shown inside the iOS permission popup.</p><p>Example:</p><p>“This app needs camera access to upload profile pictures.”</p><p>Important interview point:</p><p>If you forget adding these keys, your app may build successfully.</p><p>But the moment your app requests that permission at runtime, iOS terminates the app.</p><p>There is no compile-time warning.</p><h3>3. App Version vs Build Number</h3><p>Two very commonly confused fields:</p><h3>CFBundleShortVersionString</h3><p>This is your user-facing app version.</p><p>Example:</p><p>1.2.0</p><p>Users see this version on the App Store.</p><p>Usually follows semantic versioning:</p><p>Major.Minor.Patch</p><h3>CFBundleVersion</h3><p>This is your internal build number.</p><p>Example:</p><p>42</p><p>Every upload to App Store Connect requires a higher build number.</p><p>Example:</p><p>Version:<br>1.2.0</p><p>Builds:</p><pre>40<br>41<br>42</pre><p>If build 42 gets rejected and you upload a fix:</p><p>Version can remain:</p><p>1.2.0</p><p>But build must become:</p><p>43</p><h3>4. Why CFBundleIdentifier is Critical</h3><p>Example:</p><p>com.company.myapp</p><p>This is the unique identity of your iOS application.</p><p>It connects your app with:</p><ul><li>App Store listing</li><li>Provisioning profiles</li><li>Push notification certificates</li><li>Associated services</li></ul><p>Changing it after release is dangerous.</p><p>Why?</p><p>Because iOS treats it as a completely different application.</p><p>You lose:</p><ul><li>Existing users</li><li>Reviews</li><li>App history</li></ul><p>For production apps, consider the bundle identifier almost permanent.</p><h3>5. How Native Launch Screen Works</h3><p>In Info.plist you might see:</p><p>UILaunchStoryboardName</p><p>This defines the native launch screen.</p><p>Important:</p><p>The launch screen is not React Native.</p><p>It appears before:</p><ul><li>JavaScript bundle loads</li><li>React starts rendering</li><li>App state exists</li></ul><p>It is a pure native static screen.</p><p>Because of this, it cannot contain:</p><ul><li>API-driven UI</li><li>Real animations</li><li>User-specific data</li></ul><p>Its job is simple:</p><p>Show something instantly while the application starts.</p><h3>6. React Native Splash Screen Problem</h3><p>React Native apps have a startup sequence:</p><p>Native launch screen<br>↓<br>JavaScript engine starts<br>↓<br>Bundle loads<br>↓<br>React renders UI</p><p>Sometimes there is a gap between native splash disappearing and React Native UI appearing.</p><p>Result?</p><p>White flash.</p><p>To solve this, React Native apps commonly use libraries like:</p><p>react-native-bootsplash</p><p>The idea:</p><p>Keep the native splash visible until JavaScript tells it:</p><p>“My UI is ready now.”</p><p>This creates a smoother startup experience.</p><h3>7. Supported Screen Orientations</h3><p>Controlled using:</p><p>UISupportedInterfaceOrientations</p><p>Example:</p><p>Portrait</p><p>Landscape Left</p><p>Landscape Right</p><p>This works at the native iOS level.</p><p>Important React Native point:</p><p>Even if your JS components are not designed for landscape, iOS can still rotate the window if Info.plist allows it.</p><p>Native configuration wins first.</p><h3>8. URL Schemes: Outbound vs Inbound</h3><p>Two important keys:</p><h3>LSApplicationQueriesSchemes</h3><p>Used when your app wants to query/open another app.</p><p>Example:</p><p>Your app checking:</p><p>“Is WhatsApp installed?”</p><p>Flow:</p><p>Your App → WhatsApp</p><p>This is outbound communication.</p><h3>CFBundleURLTypes</h3><p>Used when other apps open your app.</p><p>Example:</p><p>Payment app redirects back:</p><p>Payment App → Your App</p><p>This is inbound deep linking.</p><h3>9. Why Linking.canOpenURL Sometimes Fails</h3><p>Example:</p><pre>Linking.canOpenURL(&quot;whatsapp://send&quot;)</pre><p>Even if WhatsApp is installed, this can return:</p><p>false</p><p>Why?</p><p>Because iOS protects user privacy.</p><p>You must explicitly declare:</p><p>whatsapp</p><p>inside:</p><p>LSApplicationQueriesSchemes</p><p>Then iOS allows your app to check.</p><h3>10. Why HTTP APIs Fail on iOS Builds</h3><p>By default, iOS enforces:</p><p>App Transport Security (ATS)</p><p>ATS blocks insecure HTTP traffic.</p><p>Example:</p><p>Blocked:</p><p><a href="http://api.example.com/">http://api.example.com</a></p><p>Allowed:</p><p><a href="https://api.example.com/">https://api.example.com</a></p><p>During development you might add:</p><p>NSAppTransportSecurity</p><p>with:</p><p>NSAllowsArbitraryLoads = true</p><p>This disables ATS restrictions.</p><p>But for production apps, avoid allowing everything.</p><p>A better approach:</p><p>Use:</p><p>NSExceptionDomains</p><p>and allow only specific trusted domains.</p><h3>Final Thoughts</h3><p>For React Native developers, Info.plist might look like a simple configuration file, but it controls critical native behavior.</p><p>Understanding it helps debug:</p><ul><li>Permission crashes</li><li>Deep linking issues</li><li>Splash screen problems</li><li>Release failures</li><li>App Store upload errors</li><li>Network security issues</li></ul><p>A strong React Native developer should understand not only JavaScript code, but also the native systems that run before JavaScript even starts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b8140049676" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Native New Architecture for Developers and Interviews]]></title>
            <link>https://medium.com/@siddhantshelake/react-native-new-architecture-for-developers-and-interviews-9fec7b12634a?source=rss-a39b98bdb441------2</link>
            <guid isPermaLink="false">https://medium.com/p/9fec7b12634a</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[new-architecture]]></category>
            <category><![CDATA[hermes]]></category>
            <category><![CDATA[react-native-development]]></category>
            <dc:creator><![CDATA[Siddhant Shelake]]></dc:creator>
            <pubDate>Tue, 02 Jun 2026 16:23:12 GMT</pubDate>
            <atom:updated>2026-06-02T16:23:12.457Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve been preparing for React Native interviews recently, you’ve probably heard terms like <strong>JSI</strong>, <strong>Hermes</strong>, <strong>TurboModules</strong>, and <strong>Fabric</strong>.</p><p>Many developers memorize definitions, but interviewers often want to understand whether you know <strong>why React Native introduced the New Architecture and what problems it solves</strong>.</p><p>In this article, I’ll explain the complete flow in simple terms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ONEMttixbQFCpkdRsIx_xw.png" /></figure><h3>Why Did React Native Need a New Architecture?</h3><p>React Native applications have always consisted of two worlds:</p><ul><li>JavaScript World</li><li>Native World (Android/iOS)</li></ul><p>Your React components, business logic, API calls, and state management run in JavaScript.</p><p>Actual UI rendering, platform APIs, camera access, Bluetooth, and device-specific functionality run on the native side.</p><p>The challenge was communication between these two worlds.</p><h3>The Old Architecture: The Bridge</h3><p>In the old React Native architecture, communication happened through something called the <strong>Bridge</strong>.</p><p>Whenever JavaScript wanted to perform a native operation, it would:</p><ol><li>Serialize data</li><li>Send it across the Bridge</li><li>Native side receives it</li><li>Deserialize data</li><li>Execute the operation</li></ol><p>The same process happened when native code needed to send information back to JavaScript.</p><pre>JavaScript<br>    ↓<br> Serialize<br>    ↓<br> Bridge<br>    ↓<br> Deserialize<br>    ↓<br> Native</pre><p>This worked well for many years, but it introduced overhead.</p><p>The more frequently JavaScript and Native communicated, the more expensive this process became.</p><p>Common examples:</p><ul><li>Animations</li><li>Gestures</li><li>Large data transfers</li><li>Frequent UI updates</li></ul><p>These situations could expose Bridge bottlenecks and impact performance.</p><h3>Enter JSI (JavaScript Interface)</h3><p>To solve this problem, React Native introduced <strong>JSI</strong>.</p><p>JSI stands for <strong>JavaScript Interface</strong>.</p><p>Instead of passing serialized messages through a Bridge, JavaScript can communicate with native code more directly through C++ bindings.</p><pre>JavaScript<br>     ↕<br>    JSI<br>     ↕<br> Native</pre><p>This removes much of the serialization and communication overhead that existed in the old architecture.</p><p>Benefits include:</p><ul><li>Faster communication</li><li>Reduced overhead</li><li>Better performance</li><li>Foundation for future React Native improvements</li></ul><p>JSI is the core building block that enables both TurboModules and Fabric.</p><h3>What Problem Does JSI Solve?</h3><p>The biggest problem JSI solves is Bridge overhead.</p><p>Previously:</p><pre>JS → Serialize → Bridge → Deserialize → Native</pre><p>Now:</p><pre>JS → JSI → Native</pre><p>Fewer steps mean less work and faster execution.</p><p>This is particularly useful when JavaScript and Native need to communicate frequently.</p><h3>Hermes: The JavaScript Engine Behind React Native</h3><p>While JSI improves communication, <strong>Hermes</strong> improves JavaScript execution itself.</p><p>Hermes is a JavaScript engine built specifically for React Native.</p><p>Before Hermes, React Native commonly used JavaScriptCore (JSC).</p><p>When using JSC:</p><ol><li>App launches</li><li>JavaScript bundle loads</li><li>Bundle is parsed</li><li>Bundle is compiled</li><li>Code executes</li></ol><p>Hermes changes this process.</p><p>During build time, Hermes converts JavaScript into bytecode.</p><p>At runtime:</p><ol><li>App launches</li><li>Bytecode loads</li><li>Bytecode executes directly</li></ol><p>This reduces startup work and improves launch performance.</p><p>Benefits:</p><ul><li>Faster startup time</li><li>Lower memory usage</li><li>Better performance on low-end devices</li></ul><h3>Why Doesn’t Hermes Automatically Fix Every Performance Issue?</h3><p>This is a common interview question.</p><p>Hermes only optimizes JavaScript execution.</p><p>Many performance issues come from other areas such as:</p><ul><li>Excessive re-renders</li><li>Poor list optimization</li><li>Heavy computations</li><li>Large image rendering</li><li>Network bottlenecks</li><li>JS-to-Native communication</li></ul><p>Hermes helps, but it isn’t a silver bullet.</p><h3>What Happens When a React Native App Starts?</h3><p>Let’s walk through the startup process.</p><p>When a user taps the application icon:</p><ol><li>Android launches MainActivity</li><li>React Native runtime initializes</li><li>Hermes starts (if enabled)</li><li>JavaScript bundle loads</li><li>AppRegistry.registerComponent() identifies the root component</li><li>React builds the component tree</li><li>UI updates are generated</li><li>Native views render on screen</li></ol><p>Understanding this flow helps answer many interview questions around application startup.</p><h3>Understanding AppRegistry.registerComponent()</h3><p>Every React Native application has a root component.</p><p>Example:</p><pre>AppRegistry.registerComponent(&#39;MyApp&#39;, () =&gt; App);</pre><p>React Native uses this registration to determine which component should be mounted first.</p><p>The name must match:</p><pre>getMainComponentName() {<br>   return &quot;MyApp&quot;;<br>}</pre><p>Once the names match, React Native renders the root component.</p><h3>JS Thread vs Native Thread</h3><p>React Native uses multiple threads.</p><h3>JavaScript Thread</h3><p>Responsible for:</p><ul><li>React components</li><li>State updates</li><li>Business logic</li><li>API calls</li><li>Event handling</li></ul><h3>Native/UI Thread</h3><p>Responsible for:</p><ul><li>Rendering views</li><li>Touch handling</li><li>Native APIs</li><li>Screen updates</li></ul><p>Communication between these layers happened through the Bridge in the old architecture and through JSI in the new architecture.</p><h3>What Happens If the JS Thread Gets Blocked?</h3><p>Imagine running a heavy loop:</p><pre>while(true) {}</pre><p>The JS thread becomes blocked.</p><p>Consequences:</p><ul><li>State updates stop</li><li>Event handlers stop</li><li>Re-renders pause</li><li>User interactions become unresponsive</li></ul><p>Even if the native thread is still running, React Native depends heavily on the JS thread for application logic.</p><p>The result is lag, freezes, and dropped frames.</p><h3>Why Are Reanimated Animations Smoother?</h3><p>Traditional animations often depended on the JS thread.</p><p>If the JS thread became busy:</p><ul><li>Animation frames could be delayed</li><li>UI could stutter</li></ul><p>Libraries such as React Native Reanimated move animation execution closer to the native/UI side.</p><p>This reduces dependency on the JS thread and results in smoother animations.</p><h3>TurboModules: Faster Native Modules</h3><p>Traditional Native Modules had one major limitation.</p><p>All modules were initialized during application startup, even if they were never used.</p><p>For example:</p><ul><li>Camera Module</li><li>Bluetooth Module</li><li>Location Module</li></ul><p>Even unused modules consumed startup time and memory.</p><p>TurboModules solve this through lazy loading.</p><p>Modules initialize only when needed.</p><p>Benefits:</p><ul><li>Faster startup</li><li>Lower memory usage</li><li>Reduced overhead</li><li>Better type safety through Codegen</li></ul><h3>Fabric: The New Rendering System</h3><p>Fabric is React Native’s modern rendering engine.</p><p>Previously, UI updates passed through the legacy UI Manager and Bridge.</p><p>Fabric replaces that entire rendering pipeline.</p><p>Benefits include:</p><ul><li>Faster UI updates</li><li>Better synchronization</li><li>Reduced communication overhead</li><li>Improved responsiveness</li></ul><p>Fabric works together with:</p><ul><li>JSI</li><li>TurboModules</li><li>React Concurrent Features</li></ul><p>to create a more efficient rendering system.</p><h3>How Everything Fits Together</h3><p>Think of the New Architecture as three major building blocks:</p><h3>JSI</h3><p>Provides direct JavaScript-to-Native communication.</p><h3>TurboModules</h3><p>Replaces Native Modules with lazy-loaded modules.</p><h3>Fabric</h3><p>Replaces the old rendering system.</p><p>Together they:</p><ul><li>Reduce Bridge dependency</li><li>Improve startup performance</li><li>Lower communication overhead</li><li>Improve rendering performance</li><li>Create a smoother user experience</li></ul><h3>Final Interview Answer</h3><p><strong>What is React Native’s New Architecture?</strong></p><p>React Native’s New Architecture is built around JSI, TurboModules, and Fabric. JSI enables direct communication between JavaScript and native code, TurboModules replace traditional Native Modules with lazy-loaded modules, and Fabric introduces a modern rendering system for more efficient UI updates. Together, they reduce Bridge dependency, improve startup performance, and provide a smoother user experience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fec7b12634a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>