<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jalaj Bankar</title>
    <description>The latest articles on DEV Community by Jalaj Bankar (@jalajb).</description>
    <link>https://dev.to/jalajb</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2903731%2F4b42e437-5a5d-40a5-916c-fafa0b7ad2fe.png</url>
      <title>DEV Community: Jalaj Bankar</title>
      <link>https://dev.to/jalajb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jalajb"/>
    <language>en</language>
    <item>
      <title>React Fiber, react-quill, and Why Component Architecture Is the Whole Point</title>
      <dc:creator>Jalaj Bankar</dc:creator>
      <pubDate>Fri, 20 Mar 2026 17:25:49 +0000</pubDate>
      <link>https://dev.to/jalajb/react-fiber-react-quill-and-why-component-architecture-is-the-whole-point-1p42</link>
      <guid>https://dev.to/jalajb/react-fiber-react-quill-and-why-component-architecture-is-the-whole-point-1p42</guid>
      <description>&lt;h2&gt;
  
  
  A session that goes under the hood of React itself. Most developers use React without ever knowing how it actually schedules and renders work. This changes that.
&lt;/h2&gt;




&lt;p&gt;**&lt;br&gt;
React Fiber** — A Complete Rewrite, Not Just an Update&lt;br&gt;
React Fiber landed in React v16 and it wasn't a new feature — it was a ground-up rewrite of how React does its work internally. The old system had long-standing issues that couldn't be patched. Fiber fixed them properly.&lt;br&gt;
The core idea: every component now has its own Fiber — also called a Unit of Work. What you see rendered on screen is called Finished Work. The Fiber is the behind-the-scenes representation, the Finished Work is what actually made it to the DOM.&lt;/p&gt;




&lt;p&gt;The Old Problem — &lt;strong&gt;Stack Reconciler&lt;/strong&gt;&lt;br&gt;
The old reconciler used a Stack data structure. Stacks are synchronous by nature — last in, first out, and you can't stop in the middle. Once React started rendering a tree, it had to finish the whole thing before doing anything else.&lt;br&gt;
Imagine a large component tree rendering and a user starts typing in a search bar. The old React would make them wait. The typing felt laggy because React was busy and couldn't pause. That's the problem Fiber was built to solve.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Fiber Reconciler&lt;/strong&gt; — Async, Prioritised, Interruptible&lt;br&gt;
Fiber replaced the Stack with its own Fiber data structure — a linked list of units of work that can be paused, resumed, reused, or thrown away entirely.&lt;br&gt;
Here's what that unlocks:&lt;br&gt;
Split work into chunks — every single component gets its own rendering unit. Not the whole tree at once.&lt;br&gt;
Pause rendering — if React sees the user typing or clicking, it can pause low-priority work and handle the interaction first.&lt;br&gt;
Reuse or abort work — if something changes mid-render, React can throw away what it was doing and start fresh with the new state.&lt;br&gt;
Prioritise everything — work isn't equal anymore. React assigns priority levels:&lt;br&gt;
Immediate — clicks, typing. Has to feel instant.&lt;br&gt;
High — animations. Can't afford to drop frames.&lt;br&gt;
Low — data fetching, background updates. Can wait.&lt;br&gt;
If a low-priority fetch is happening and the user clicks something, React pauses the fetch work, handles the click, then comes back to the fetch. The user never feels the lag.&lt;/p&gt;




&lt;p&gt;The Two Phases of Fiber&lt;br&gt;
Phase 1 — &lt;strong&gt;Render Phase (Async)&lt;/strong&gt;&lt;br&gt;
This is where React figures out what needs to change. It runs beginWork() and completeWork() on each Fiber unit — building up a picture of the new UI in memory. This phase can be paused, restarted, or thrown away. Nothing has touched the real DOM yet.&lt;br&gt;
&lt;strong&gt;Phase 2 — Commit Phase (Synchronous)&lt;/strong&gt;&lt;br&gt;
Once React has the full picture ready, it commits everything to the DOM in one go using commitWork(). This phase cannot be interrupted — it runs synchronously start to finish. The reason is simple: you can't have a half-updated DOM visible to the user. All or nothing.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;react-quill&lt;/strong&gt; — Rich Text Editing Without Building It Yourself&lt;br&gt;
react-quill is a React wrapper around Quill.js — a powerful, modular text editor engine. Quill.js itself doesn't know React exists. react-quill just bridges the two worlds.&lt;br&gt;
What you get is a fully functional WYSIWYG (What You See Is What You Get) editor — Bold, Italic, Underline, links, headings, lists — all the formatting tools a user would expect in a text editor, ready to drop into a React component.&lt;br&gt;
import ReactQuill from 'react-quill';&lt;br&gt;
&lt;br&gt;
Two lines and you have a production-ready rich text editor. Saves days of work.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Component Architecture&lt;/strong&gt; — The Three Reasons It Matters&lt;br&gt;
Everything in React is a component. But why that structure exists is worth understanding properly:&lt;br&gt;
Reusability — write a  once, use it across fifty pages. Change it in one place, it updates everywhere. This is the single biggest time saver in frontend development.&lt;br&gt;
Isolation — components don't bleed into each other. If your  breaks, you open SearchBar.js and the problem is right there. You're not hunting through thousands of lines of mixed code.&lt;br&gt;
Composability — components nest inside each other naturally:&lt;br&gt;
&lt;code&gt;&amp;lt;NewsFeed&amp;gt;&lt;br&gt;
  &amp;lt;Post /&amp;gt;&lt;br&gt;
  &amp;lt;Post /&amp;gt;&lt;br&gt;
  &amp;lt;Post /&amp;gt;&lt;br&gt;
&amp;lt;/NewsFeed&amp;gt;&lt;/code&gt;&lt;br&gt;
 doesn't need to know how  renders.  doesn't need to know it lives inside . Each one does its job. Together they build the whole UI. That separation is what makes large apps manageable.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>SWR, Webhooks, useState Deep Dive, and a Few Things Worth Cementing</title>
      <dc:creator>Jalaj Bankar</dc:creator>
      <pubDate>Fri, 20 Mar 2026 17:22:51 +0000</pubDate>
      <link>https://dev.to/jalajb/swr-webhooks-usestate-deep-dive-and-a-few-things-worth-cementing-3164</link>
      <guid>https://dev.to/jalajb/swr-webhooks-usestate-deep-dive-and-a-few-things-worth-cementing-3164</guid>
      <description>&lt;h2&gt;
  
  
  A session that revisits some fundamentals with fresh eyes and adds a couple of genuinely useful concepts on top. The useState explanation here is the clearest it's been — worth reading carefully.
&lt;/h2&gt;




&lt;p&gt;&lt;strong&gt;React SWR&lt;/strong&gt; — Show Old Data, Fetch New Data, Nobody Waits&lt;br&gt;
SWR stands for Stale-While-Revalidate — a caching strategy that shows you whatever data it already has while quietly fetching fresh data in the background.&lt;br&gt;
Here's what makes it worth knowing:&lt;br&gt;
You give it a key (usually the URL) and a fetcher function (your actual network call). It handles the rest — caching, revalidating, deduplication.&lt;br&gt;
If ten components all need the same data, SWR doesn't make ten requests. It makes one and shares the result across all of them.&lt;br&gt;
It also re-fetches automatically when you re-focus the window — so if a user switches tabs and comes back, they always see fresh data without you writing any logic for it.&lt;br&gt;
const { data, error, isLoading } = useSWR('/api/user', fetcher);&lt;br&gt;
Three things back — your data, any error, and a loading state. Clean, no boilerplate, handles edge cases you'd otherwise forget to write.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Webhooks&lt;/strong&gt; — Stop Asking, Just Listen&lt;br&gt;
Polling is when your app keeps asking the server every few seconds — "is it done? is it done? is it done?" — like a kid in the back seat. Works, but wasteful.&lt;br&gt;
Webhooks flip that relationship. Instead of you asking, the server tells you when something happens. Once, immediately, no repeated requests.&lt;br&gt;
Real example — user pays via GPay → GPay sends a notification (HTTP POST) directly to your server the moment the payment is confirmed. Your server wasn't sitting there asking. GPay knocked on the door when it had news.&lt;br&gt;
Better for performance, better for real-time accuracy, better for your server's sanity.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;useState&lt;/strong&gt; — The Clearest Explanation Yet&lt;br&gt;
Let's go through this properly because it trips people up more than almost anything else in React.&lt;br&gt;
c&lt;code&gt;onst [data, setData] = useState(0);&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;useState(0)&lt;/strong&gt; — that &lt;strong&gt;0&lt;/strong&gt; is the &lt;strong&gt;initial value&lt;/strong&gt;. What data holds on the very first render before anything happens.&lt;br&gt;
data — a read-only snapshot of the current state. You cannot change it directly. Ever. data = 5 does nothing useful in React.&lt;br&gt;
setData — the only door into changing state. It receives new data, tells React "store this as the new value," triggers a re-render, and on that next render data becomes the new stored value.&lt;br&gt;
So the question — "if data already has data, why do we need setData?" — here's the answer:&lt;br&gt;
Because React needs to know something changed. If you mutate data directly, React has no idea and won't re-render. setData is the signal. It's not just storage — it's the trigger that kicks off the whole update cycle.&lt;br&gt;
setData receives → React stores → data updates → component re-renders with new value. That's the full loop every single time.&lt;/p&gt;




&lt;p&gt;Why Callbacks Sit Between Hooks and Their Logic&lt;br&gt;
onChange(() =&amp;gt; { setCount(count + 1) })&lt;br&gt;
useEffect(() =&amp;gt; { setAPI(data) }, [])&lt;br&gt;
The callback function is there to say — "wait for me to run first, then you go." The hook (useEffect, onChange, setTimeout) needs to execute before the inner logic fires. The callback is what creates that waiting relationship. Without it, the setter functions would have nothing to wait for — they'd either run immediately or not at all.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;setTimeout&lt;/strong&gt; — Wait Before You Even Start&lt;br&gt;
This one is worth being precise about. The delay in setTimeout is not "run this, but slowly." It's "don't even begin until this much time has passed."&lt;br&gt;
setTimeout(() =&amp;gt; { doSomething(); }, 3000);&lt;br&gt;
Three seconds of silence. Then execution begins. Nothing happens in the meantime — no partial work, no progress. Just waiting. Then go.&lt;/p&gt;




&lt;p&gt;Always Use try / catch / finally With Async Code&lt;br&gt;
This is a best practice worth making a habit immediately:&lt;br&gt;
&lt;code&gt;async function fetchData() {&lt;br&gt;
  try {&lt;br&gt;
    const res = await fetch(url);&lt;br&gt;
    const data = await res.json();&lt;br&gt;
    setData(data);&lt;br&gt;
  } catch (err) {&lt;br&gt;
    console.error("Something went wrong:", err);&lt;br&gt;
  } finally {&lt;br&gt;
    setLoading(false);&lt;br&gt;
  }&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;try&lt;/strong&gt; — the optimistic path. Things go well here.&lt;br&gt;
*&lt;em&gt;catch *&lt;/em&gt;— when they don't. Catches any error thrown inside try.&lt;br&gt;
*&lt;em&gt;finally *&lt;/em&gt;— runs no matter what. Success or failure, the loader disappears. This is non-negotiable with async functions — if you skip finally and an error gets thrown, setLoading(false) inside try never runs and your spinner spins forever.&lt;br&gt;
Make it a reflex. Async function — try, catch, finally. Every time.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>react</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Promises, Batching, AbortController, and How the Web Actually Works</title>
      <dc:creator>Jalaj Bankar</dc:creator>
      <pubDate>Fri, 20 Mar 2026 17:20:09 +0000</pubDate>
      <link>https://dev.to/jalajb/promises-batching-abortcontroller-and-how-the-web-actually-works-53hi</link>
      <guid>https://dev.to/jalajb/promises-batching-abortcontroller-and-how-the-web-actually-works-53hi</guid>
      <description>&lt;h2&gt;
  
  
  A session that fills in a lot of gaps. Some advanced Promise patterns, a React performance secret most beginners don't know about, and then a mental model for HTTP and APIs that's worth reading twice.
&lt;/h2&gt;




&lt;p&gt;&lt;code&gt;.then()&lt;/code&gt; and &lt;code&gt;.finally()&lt;/code&gt; Are Full Functions — Use Them That Way&lt;br&gt;
A common mistake is treating .then() like it can only do one thing. It's a full function — you can declare variables, write logic, run conditions, all of it:&lt;br&gt;
&lt;code&gt;Promise.allSettled([fetchConfig, fetchColor])&lt;br&gt;
.then((results) =&amp;gt; {&lt;br&gt;
  const configResult = results[0].status === 'fulfilled' ? results[0].value : defaultConfig;&lt;br&gt;
  const colorResult = results[1].status === 'fulfilled' ? results[1].value : '#FFFFFF';&lt;br&gt;
})&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Promise.allSettled()&lt;/strong&gt; waits for all promises to finish — whether they resolved or rejected — and gives you a results array where each item tells you the status and value. No promise getting rejected silently breaks everything else. You handle each one individually.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;The Loader and allSettled Are Best Friends&lt;/strong&gt;&lt;br&gt;
Think about it — a loading spinner should disappear exactly when the data is ready. Not before, not after. Promise.allSettled() + .finally() is the cleanest way to guarantee that:&lt;br&gt;
&lt;code&gt;Promise.allSettled([fetchConfig, fetchColor])&lt;br&gt;
.then((results) =&amp;gt; {&lt;br&gt;
  // handle your data&lt;br&gt;
})&lt;br&gt;
.finally(() =&amp;gt; {&lt;br&gt;
  setLoading(false);&lt;br&gt;
})&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;.finally()&lt;/strong&gt; runs no matter what — success, failure, doesn't matter. The spinner dies exactly when the promises settle. If you don't use .finally(), you risk the spinner spinning forever if an error is thrown and .then() never runs.&lt;/p&gt;




&lt;p&gt;&lt;code&gt;JSON.stringify(data, null, 2)&lt;/code&gt; — &lt;strong&gt;Pretty Printing JSON&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;JSON.stringify(data.config, null, 2)&lt;/code&gt;&lt;br&gt;
The 2 here is the indentation level — it formats the output with two spaces per level so it's actually readable in a console or log. Without it you get one long unreadable line. The null in the middle is the replacer argument — passing null just means "include everything, no filtering."&lt;/p&gt;




&lt;p&gt;AbortController — Cancel a Request When You No Longer Need It&lt;br&gt;
Imagine a user opens a page, a fetch starts, then they immediately navigate away. The fetch is still running in the background — and when it finishes, it might try to update state on a component that no longer exists. AbortController stops that:&lt;br&gt;
const controller = new AbortController();&lt;br&gt;
fetch(url, { signal: controller.signal })&lt;br&gt;
.then(res =&amp;gt; res.json())&lt;br&gt;
.then(data =&amp;gt; setData(data));&lt;br&gt;
// When the user leaves:&lt;br&gt;
controller.abort();&lt;br&gt;
Inside useEffect, you'd call controller.abort() in the cleanup function — the one that runs when the component unmounts. Only update state if the user is still on the page. Clean, safe, no ghost updates.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;React's Automatic Batching&lt;/strong&gt; — One Render, Not Two&lt;br&gt;
In React 18+, when you call multiple state setters one after another inside a .then() block:&lt;br&gt;
&lt;code&gt;setData(result);&lt;br&gt;
setLoading(false);&lt;/code&gt;&lt;br&gt;
React doesn't re-render twice. It waits until the function finishes, collects all the state updates, and does one single render with everything applied at once. This is called Automatic Batching and it's a silent performance optimisation you get for free.&lt;br&gt;
Why it matters — if setLoading(false) runs in the wrong place, React might render once with new data but loading still true, then render again with loading false. The user sees a half-finished page for a split second — that flicker. Keeping your state updates together inside .then() or .finally() lets React batch them properly and render once cleanly.&lt;/p&gt;




&lt;p&gt;useState Always Holds the Initial Value&lt;br&gt;
const [data, setData] = useState(null);&lt;br&gt;
Whatever you pass into useState() is the starting value — what the component holds on its very first render before anything updates it. After that, only setData() changes it. Simple but worth keeping clear in your head especially when debugging why something is null on first render.&lt;/p&gt;




&lt;p&gt;How the Web Actually Works — The Full Mental Model&lt;br&gt;
These are the rules. Read them slowly:&lt;br&gt;
&lt;strong&gt;API does not travel&lt;/strong&gt; — the API is just a definition. A menu of what's available.&lt;br&gt;
&lt;strong&gt;HTTP request travels&lt;/strong&gt; — the actual message that goes across the internet.&lt;br&gt;
&lt;strong&gt;Frontend never talks directly to DB&lt;/strong&gt; — the browser has no business touching a database directly.&lt;br&gt;
&lt;strong&gt;Backend owns DB communication&lt;/strong&gt; — the server talks to the database, nobody else.&lt;br&gt;
&lt;strong&gt;Middleware enables body parsing&lt;/strong&gt; — without it, your backend can't read the body of incoming requests.&lt;br&gt;
&lt;strong&gt;Methods express intent&lt;/strong&gt; — the HTTP method tells the server what you want to do, not just where to go.&lt;/p&gt;




&lt;p&gt;The HTTP Methods — What Each One Means:&lt;br&gt;
&lt;strong&gt;GET&lt;/strong&gt; — "please send me data"&lt;br&gt;
&lt;strong&gt;POST&lt;/strong&gt; — "please create something new"&lt;br&gt;
&lt;strong&gt;PUT&lt;/strong&gt; — "please replace this entirely"&lt;br&gt;
&lt;strong&gt;PATCH&lt;/strong&gt; — "please update just part of this"&lt;br&gt;
&lt;strong&gt;DELETE&lt;/strong&gt; — "please remove this"&lt;/p&gt;




&lt;p&gt;The Restaurant Mental Model — Stick This in Your Head:&lt;br&gt;
&lt;strong&gt;Menu&lt;/strong&gt; = API — defines what can be ordered, doesn't deliver anything itself&lt;br&gt;
&lt;strong&gt;Order&lt;/strong&gt; = HTTP request — the actual message sent&lt;br&gt;
*&lt;em&gt;Waiter *&lt;/em&gt;= Internet — carries the message back and forth&lt;br&gt;
*&lt;em&gt;Kitchen *&lt;/em&gt;= Backend — receives the order, does the work&lt;br&gt;
*&lt;em&gt;Food *&lt;/em&gt;= Response — what comes back&lt;br&gt;
So when someone says "the API sends data" — not quite. The API defines what data can be requested. The HTTP request is what actually goes out and asks for it. The API is the menu. The request is the order. The backend is the kitchen that actually makes the food.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>node</category>
    </item>
    <item>
      <title>Libraries, Errors, Concepts, and the Full Map of a Software Project</title>
      <dc:creator>Jalaj Bankar</dc:creator>
      <pubDate>Fri, 20 Mar 2026 17:10:56 +0000</pubDate>
      <link>https://dev.to/jalajb/libraries-errors-concepts-and-the-full-map-of-a-software-project-b96</link>
      <guid>https://dev.to/jalajb/libraries-errors-concepts-and-the-full-map-of-a-software-project-b96</guid>
      <description>&lt;h2&gt;
  
  
  A wide session today — some React and Node utilities, JavaScript error types worth knowing, a few important concepts, and then something genuinely useful at the end: the full picture of every category of tool a real software project actually needs.
&lt;/h2&gt;




&lt;p&gt;&lt;strong&gt;react-window&lt;/strong&gt; — Don't Render What the User Can't See&lt;br&gt;
&lt;code&gt;npm install react-window&lt;/code&gt;&lt;br&gt;
If you're rendering a list of 10,000 items, React doesn't need to put all 10,000 in the DOM at once. react-window handles virtualization — it only renders the items currently visible in the viewport and quietly swaps them out as the user scrolls. Same experience for the user, dramatically less work for the browser.&lt;/p&gt;




&lt;p&gt;Non-Null Assertion in TypeScript — The ! Operator&lt;br&gt;
When TypeScript isn't sure if a value might be null or undefined, it'll warn you. If you know it definitely isn't null, you can tell TypeScript to trust you using !:&lt;br&gt;
let text = document.getElementById('text')!;&lt;br&gt;
That ! at the end says "I promise this isn't null, stop worrying." TypeScript backs off. Use it when you're certain — if you're wrong, you'll get a runtime error and TypeScript won't warn you because you told it not to.&lt;/p&gt;




&lt;p&gt;The process Object in Node.js&lt;br&gt;
process is a global object Node.js gives you automatically — no import needed. It's your window into the runtime environment:&lt;br&gt;
&lt;strong&gt;process.env&lt;/strong&gt; — access environment variables like process.env.PORT or &lt;strong&gt;process.env.API_KEY&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;process.argv&lt;/strong&gt; — array of command line arguments passed when running your script&lt;br&gt;
&lt;strong&gt;process.exit(0)&lt;/strong&gt; — clean exit, no errors, everything went fine&lt;br&gt;
&lt;strong&gt;process.exit(1)&lt;/strong&gt; — exit with failure, something went wrong&lt;br&gt;
The exit codes matter in CI/CD pipelines — 0 means success, anything else means the pipeline should stop and flag an error.&lt;/p&gt;




&lt;p&gt;React Context — Global Data Without Prop Drilling&lt;br&gt;
Context is React's built-in way to share data across components without manually passing props through every level in between. You've touched on this before — worth restating cleanly: create the context, wrap your tree with a Provider, consume it anywhere below with useContext. The component that needs the data just reaches up and grabs it directly. No middlemen.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;JavaScript Error Types&lt;/strong&gt; — Know What You're Looking At&lt;br&gt;
Every error in JavaScript has a type, and the type tells you immediately what kind of problem you're dealing with:&lt;br&gt;
&lt;strong&gt;SyntaxError&lt;/strong&gt; — your code structure is broken. JavaScript couldn't even parse it. Usually a missing bracket, a typo in a keyword, something that stops the engine before it even runs.&lt;br&gt;
&lt;strong&gt;ReferenceError&lt;/strong&gt; — you're trying to use something that was never defined. Classic sign of a typo in a variable name or using something before it's been declared.&lt;br&gt;
&lt;strong&gt;TypeError&lt;/strong&gt; — you're doing something to a value that that type doesn't support. Calling .map() on a string, calling a variable that's not a function, accessing a property on null.&lt;br&gt;
&lt;strong&gt;RangeError&lt;/strong&gt; — a value is outside acceptable limits. Passing -1 to an array constructor, or hitting maximum call stack size from infinite recursion.&lt;br&gt;
&lt;strong&gt;URIError&lt;/strong&gt; — malformed URI data, usually from misusing decodeURIComponent() or similar functions.&lt;br&gt;
&lt;strong&gt;EvalError&lt;/strong&gt; — related to eval() usage. Rare. You probably won't see this in modern code.&lt;br&gt;
Custom Error — intentionally thrown by a developer when something specific goes wrong that the standard error types don't cover. throw new Error("Payment failed") is a custom error.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Circular References&lt;/strong&gt; — When Objects Point Back at Themselves&lt;br&gt;
A self-reference is when an object points directly to itself: A → A&lt;br&gt;
A circular reference is when multiple objects reference each other in a loop: A → B → A&lt;br&gt;
This becomes a real problem when you try to JSON.stringify() a circular reference — it throws a TypeError because JSON can't represent infinite loops. It also causes memory leaks in certain situations because the garbage collector can't clean up objects that are still technically referenced by each other.&lt;/p&gt;




&lt;p&gt;SSO and gRPC — Two Concepts Worth Knowing&lt;br&gt;
SSO (Single Sign-On) — one login, many apps. You sign in with Google once and you're automatically authenticated across YouTube, Gmail, Google Drive without logging in again. The auth is shared, not repeated.&lt;br&gt;
gRPC — a way for services to communicate with each other using remote function calls instead of REST endpoints. Faster than REST, uses binary instead of JSON, and is strongly typed. Common in microservices where speed between internal services matters.&lt;/p&gt;




&lt;p&gt;The Full Map of Tools a Software Project Needs&lt;br&gt;
This is genuinely worth saving. Every serious software project needs tools across all of these categories — and knowing the full map means you're never caught off guard when a new tool gets introduced:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Planning &amp;amp; Tracking&lt;/strong&gt; — requirements documentation, task management, roadmapping. Knowing what to build before building it.&lt;br&gt;
&lt;strong&gt;Version Control&lt;/strong&gt; — source code management, branching, collaboration. Git lives here.&lt;br&gt;
&lt;strong&gt;Development Environment&lt;/strong&gt; — your editor or IDE, runtime, package manager. The place where code gets written.&lt;br&gt;
&lt;strong&gt;Build &amp;amp; Dependency Management&lt;/strong&gt; — installing packages, building artifacts, running scripts. npm, vite, webpack live here.&lt;br&gt;
&lt;strong&gt;Backend &amp;amp; API Layer&lt;/strong&gt; — your server framework, database access, authentication. Express, Prisma, JWT.&lt;br&gt;
&lt;strong&gt;Frontend &amp;amp; UI&lt;/strong&gt; — rendering framework, state management, UI components. React, Redux, component libraries.&lt;br&gt;
&lt;strong&gt;Testing&lt;/strong&gt; — unit tests, integration tests, end-to-end tests. Each catches a different kind of bug at a different level.&lt;br&gt;
&lt;strong&gt;Code Quality&lt;/strong&gt; — linting, formatting, static analysis. ESLint, Prettier. The stuff that keeps code consistent across a team.&lt;br&gt;
&lt;strong&gt;CI/CD&lt;/strong&gt; — automated tests, deployment pipelines. Every push gets tested and deployed automatically without manual steps.&lt;br&gt;
&lt;strong&gt;Deployment &amp;amp; Infrastructure&lt;/strong&gt; — hosting, containers, cloud services. Where your app actually lives and runs.&lt;br&gt;
&lt;strong&gt;Monitoring &amp;amp; Logging&lt;/strong&gt; — error tracking, performance metrics, logs. How you find out something broke in production before your users tell you.&lt;br&gt;
&lt;strong&gt;Security&lt;/strong&gt; — secrets management, access control, dependency scanning. Making sure nothing sensitive leaks and no vulnerable packages sneak in.&lt;br&gt;
Twelve categories. Most developers start knowing two or three of these well. Knowing all &lt;strong&gt;twelve exist&lt;/strong&gt; — and what problem each one solves — is already ahead of most.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Promises, Data Flow, and the memo + useCallback Combo That Actually Makes React Fast</title>
      <dc:creator>Jalaj Bankar</dc:creator>
      <pubDate>Fri, 20 Mar 2026 17:06:30 +0000</pubDate>
      <link>https://dev.to/jalajb/promises-data-flow-and-the-memo-usecallback-combo-that-actually-makes-react-fast-13j4</link>
      <guid>https://dev.to/jalajb/promises-data-flow-and-the-memo-usecallback-combo-that-actually-makes-react-fast-13j4</guid>
      <description>&lt;h2&gt;
  
  
  A big session with some genuinely advanced React in the second half. The memo and useCallback combination is one of those things that looks complicated but makes complete sense once you understand why it exists.
&lt;/h2&gt;




&lt;p&gt;&lt;code&gt;.then()&lt;/code&gt; Can Handle &lt;strong&gt;Rejections&lt;/strong&gt; Too — Not Just &lt;code&gt;.catch()&lt;/code&gt;&lt;br&gt;
Most people only use .catch() for errors and .then() for success. But .then() actually accepts two functions — one for success, one for rejection:&lt;br&gt;
&lt;strong&gt;promise&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;.then(successFn) // handles success only&lt;br&gt;
.then(successFn, errorFn) // handles both&lt;br&gt;
.catch(errorFn) // handles rejection only&lt;/code&gt;&lt;br&gt;
Here's the quick reference:&lt;br&gt;
&lt;code&gt;.then(successFn) — success ✅, rejection ❌ skipped&lt;br&gt;
.then(successFn, errorFn) — success ✅, rejection ✅&lt;br&gt;
.catch(errorFn) — success ❌ skipped, rejection ✅&lt;/code&gt;&lt;br&gt;
And the other thing worth locking in — whatever you return inside a .then() gets passed down to the next .then() or .catch() waiting below it. The chain is just values being handed down one step at a time.&lt;/p&gt;




&lt;p&gt;React Data Flow — The Parent is Always in Charge&lt;br&gt;
A few rules that are worth stating clearly because they govern everything in React:&lt;br&gt;
Only one function gets export default — that's your root component.&lt;br&gt;
A prop-name and the variable holding it can be the same name —  is perfectly valid.&lt;br&gt;
Re-rendering starts from the Parent — no child re-renders on its own. The parent gives permission, intentionally or not.&lt;br&gt;
Here's the full flow when a child updates state:&lt;br&gt;
Child runs a setter function → Parent's state updates → Parent re-renders → all children re-render by default, whether they needed to or not.&lt;br&gt;
That last part is the problem. A child that didn't receive any new data still re-renders just because it lives inside the parent. In small apps this is fine. In larger ones it becomes a real performance issue.&lt;/p&gt;




&lt;p&gt;memo — Telling React "Don't Re-render This Unnecessarily"&lt;br&gt;
memo wraps a component and tells React — "only re-render this if its props actually changed."&lt;br&gt;
&lt;code&gt;import { memo } from 'react';&lt;br&gt;
export const Child1 = memo(({ setToggle }) =&amp;gt; {&lt;br&gt;
  console.log("Child1 Rendered!");&lt;br&gt;
  return &amp;lt;button onClick={() =&amp;gt; setToggle((t) =&amp;gt; !t)}&amp;gt;Toggle&amp;lt;/button&amp;gt;;&lt;br&gt;
});&lt;/code&gt;&lt;br&gt;
Sounds perfect. But there's a catch.&lt;/p&gt;

&lt;p&gt;The memo Trap — Functions Are Always "New"&lt;br&gt;
Every time App re-renders, any function defined inside it gets recreated from scratch. It looks the same to you, but React sees it as a brand new function reference. So even with memo, Child1 re-renders — because React thinks setToggle changed.&lt;br&gt;
Same logic, new object. memo checks props with === — and two different function references are never === even if they do the exact same thing.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;useCallback&lt;/strong&gt; — Keeping Function References Stable&lt;br&gt;
useCallback wraps a function and says "keep this exact same reference between renders unless the dependencies change."&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import { useState, useCallback, memo } from 'react';&lt;br&gt;
export default function App() {&lt;br&gt;
  const [toggle, setToggle] = useState(false);&lt;br&gt;
  const memoizedSetToggle = useCallback(() =&amp;gt; {&lt;br&gt;
    setToggle((t) =&amp;gt; !t);&lt;br&gt;
  }, []);&lt;br&gt;
  return (&lt;br&gt;
    &amp;lt;&amp;gt;&lt;br&gt;
      &amp;lt;Child1 setToggle={memoizedSetToggle} /&amp;gt;&lt;br&gt;
      &amp;lt;Child2 toggle={toggle} /&amp;gt;&lt;br&gt;
    &amp;lt;/&amp;gt;&lt;br&gt;
  );&lt;br&gt;
}&lt;br&gt;
const Child1 = memo(({ setToggle }) =&amp;gt; {&lt;br&gt;
  console.log("Child1 only renders ONCE now!");&lt;br&gt;
  return &amp;lt;button onClick={setToggle}&amp;gt;Toggle&amp;lt;/button&amp;gt;;&lt;br&gt;
});&lt;br&gt;
const Child2 = memo(({ toggle }) =&amp;gt; {&lt;br&gt;
  console.log("Child2 renders when toggle changes.");&lt;br&gt;
  return &amp;lt;p&amp;gt;{toggle ? "ON" : "OFF"}&amp;lt;/p&amp;gt;;&lt;br&gt;
});&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here's why this works properly now:&lt;br&gt;
Child1 — receives memoizedSetToggle. Since useCallback keeps the same function reference every render, memo correctly sees "props didn't change" and skips the re-render. Renders once, stays there.&lt;br&gt;
Child2 — receives toggle. That value genuinely changes on every click, so Child2 should re-render to show the updated text. And it does.&lt;br&gt;
The mental model is simple — memo skips re-renders when props don't change. useCallback makes sure function props actually don't change between renders. They need each other to work properly. One without the other only solves half the problem.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>react</category>
    </item>
    <item>
      <title>setTimeout Internals, Anonymous Functions, and the this Keyword — Properly This Time</title>
      <dc:creator>Jalaj Bankar</dc:creator>
      <pubDate>Fri, 20 Mar 2026 17:03:28 +0000</pubDate>
      <link>https://dev.to/jalajb/settimeout-internals-anonymous-functions-and-the-this-keyword-properly-this-time-3d1i</link>
      <guid>https://dev.to/jalajb/settimeout-internals-anonymous-functions-and-the-this-keyword-properly-this-time-3d1i</guid>
      <description>&lt;h2&gt;
  
  
  One of those sessions where something you thought you understood gets explained at a deeper level and suddenly makes way more sense. The this keyword especially — this is the full picture.
&lt;/h2&gt;




&lt;p&gt;&lt;strong&gt;setTimeout&lt;/strong&gt; Is Just a Function Too&lt;/p&gt;

&lt;p&gt;This sounds obvious but it's worth saying clearly. setTimeout is itself a function — one that the browser gives you. Under the hood it looks something like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;function setTimeout(callback, delay) {   // browser starts the timer   // when delay is done, calls callback() }&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The timer doesn't start on its own. You start it the moment you write:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;setTimeout(myFunc, 3000);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That line is you saying — "hey browser, start a 3 second countdown, then call myFunc." You own the trigger. The browser owns the clock.&lt;br&gt;
The Only Two Valid Ways to Write an Anonymous Function&lt;/p&gt;

&lt;p&gt;There are exactly two ways to define an anonymous function and actually use it:&lt;/p&gt;

&lt;p&gt;`const myFunc = function() { ... }&lt;/p&gt;

&lt;p&gt;const myFunc2 = () =&amp;gt; { ... }`&lt;/p&gt;

&lt;p&gt;Both store the function in a variable so you can call it later. Arrow functions are anonymous by nature — they have no name of their own, they just get stored wherever you put them.&lt;/p&gt;

&lt;p&gt;This however is invalid:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;function() { ... }&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;A floating anonymous function with no variable to hold it — you've created something you can never call. JavaScript won't even let this through without throwing an error. It needs a home.&lt;/p&gt;




&lt;p&gt;&lt;code&gt;this&lt;/code&gt; Inside Objects — The Collision Problem&lt;/p&gt;

&lt;p&gt;When you're working with this inside an object method, there's one rule that saves a lot of pain: don't nest a regular function inside another regular function and expect this to behave.&lt;/p&gt;

&lt;p&gt;Here's why — every time you write the function keyword, JavaScript creates a brand new this context. So when you nest one inside another, the inner one creates its own this and completely shadows the outer one. Two bosses, one conflict.&lt;/p&gt;

&lt;p&gt;`const laptop = {   brand: "Apple",   showBrand: function() {     setTimeout(function() {       console.log(this.brand); // 'this' is Window, not laptop!     }, 1000);   } };&lt;/p&gt;

&lt;p&gt;laptop.showBrand(); // undefined 😭`&lt;/p&gt;

&lt;p&gt;The outer function in showBrand correctly points this at laptop. But the inner function inside setTimeout creates its own this — and since nothing is calling it as a method, this resets to the window object. window.brand doesn't exist. undefined.&lt;/p&gt;




&lt;p&gt;Arrow Functions Fix This — Here's Exactly Why&lt;/p&gt;

&lt;p&gt;Arrow functions don't bring their own this. They genuinely don't have one. Instead they look outward and say "I'll borrow this from whoever is above me" — this is lexical binding.&lt;/p&gt;

&lt;p&gt;`const laptop = {   brand: "Apple",   showBrand: function() {     setTimeout(() =&amp;gt; {       console.log(this.brand); // Inherits 'this' from showBrand ✅     }, 1000);   } };&lt;/p&gt;

&lt;p&gt;laptop.showBrand(); // "Apple" 🎉`&lt;/p&gt;

&lt;p&gt;The arrow function inside setTimeout has no this of its own so it looks at its parent — showBrand — which does have this pointing correctly at laptop. Problem solved, no collision.&lt;/p&gt;




&lt;p&gt;The Full this Mental Model — All Eight Rules in One Place&lt;/p&gt;

&lt;p&gt;These are worth locking in properly:&lt;/p&gt;

&lt;p&gt;this is just a reference — a pointer to whatever object is currently relevant to that function. Nothing more.&lt;/p&gt;

&lt;p&gt;Every regular function gets its own this for free the moment it's created. That's the function keyword's doing.&lt;/p&gt;

&lt;p&gt;Arrow functions have no this — they inherit it from the scope they were written in. That's lexical scoping in action.&lt;/p&gt;

&lt;p&gt;When you nest a regular function inside a regular function, the inner one shadows the outer this. Two function keywords, two this contexts, collision guaranteed.&lt;/p&gt;

&lt;p&gt;When you nest an arrow function inside a regular function, the arrow says "I'm not the boss, I'll follow whoever is above me." It binds to the parent's this at the time it's created.&lt;/p&gt;

&lt;p&gt;A regular function called without an object (just myFunc()) — this resets to window in normal mode, or undefined in strict mode.&lt;/p&gt;

&lt;p&gt;A regular function called as a method (laptop.showBrand()) — this correctly points to laptop.&lt;/p&gt;

&lt;p&gt;This is why inside objects, the outer method should use the function keyword (to establish the correct this context pointing to the object), and any inner functions should be arrow functions (to inherit that same context without creating a new one).&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Debugging Renders, Callbacks Everywhere, and JavaScript's Global Scope</title>
      <dc:creator>Jalaj Bankar</dc:creator>
      <pubDate>Fri, 20 Mar 2026 16:57:34 +0000</pubDate>
      <link>https://dev.to/jalajb/debugging-renders-callbacks-everywhere-and-javascripts-global-scope-101</link>
      <guid>https://dev.to/jalajb/debugging-renders-callbacks-everywhere-and-javascripts-global-scope-101</guid>
      <description>&lt;h2&gt;
  
  
  A session that connects a lot of dots — practical debugging instincts, the callback pattern showing up in places you didn't expect, and a cleaner understanding of why map, filter and reduce are called methods and not functions.
&lt;/h2&gt;

&lt;p&gt;When Something Doesn't Render — Where Do You Look?&lt;/p&gt;

&lt;p&gt;This is genuinely useful debugging instinct to build early:&lt;/p&gt;

&lt;p&gt;Image or text not showing up? — the problem is almost always in the API response. Open your browser console, go to the Network tab, find your request, and look at what actually came back. Nine times out of ten the data structure is different from what you expected — a nested property, a different key name, an empty array.&lt;/p&gt;




&lt;p&gt;A service not working — like Google Maps, payment widgets, auth providers? — 90% of the time it's the API key. Either it's wrong, expired, restricted to a different domain, or it's not being read properly. First place to check is your runtime.config or .env file. Make sure the key is actually there, spelled correctly, and being accessed with the right variable name.&lt;/p&gt;

&lt;p&gt;Two different problems, two different places to look. Building this reflex early saves hours of frustration.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;setTimeout&lt;/strong&gt; With a Dynamic Delay&lt;/p&gt;

&lt;p&gt;You're not locked into hardcoding the seconds inside setTimeout — you can pass the delay as a parameter and control it from outside:&lt;/p&gt;

&lt;p&gt;`function myFunc(twoFunc, seconds) {   console.log('Hi Jalaj!');   setTimeout(() =&amp;gt; {     twoFunc();   }, seconds * 1000); }&lt;/p&gt;

&lt;p&gt;myFunc(someFunction, 2);`&lt;/p&gt;

&lt;p&gt;The delay becomes flexible. Call the same function with 3 and it waits three seconds. Call it with 0 and it fires almost immediately. The function doesn't care — it just uses whatever it was given.&lt;/p&gt;




&lt;p&gt;Callbacks Are Everywhere — You've Been Using Them All Along&lt;/p&gt;

&lt;p&gt;Once you see the callback pattern you can't unsee it. &lt;strong&gt;useEffect, setTimeout, setInterval, reduce, filter, map&lt;/strong&gt; — they all accept a function while being called. That function is the callback.&lt;/p&gt;

&lt;p&gt;And it genuinely doesn't matter whether you name it or not:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Anonymous callback&lt;/strong&gt; — defined while calling:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;greetUser("Alex", () =&amp;gt; console.log("Logged in successfully. ✅"));&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Named callback&lt;/strong&gt; — defined beforehand and passed in:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;function onSuccess() { console.log("Logged in successfully. ✅"); } greetUser("Alex", onSuccess);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Same result. The parent function doesn't care what your callback's name is — it just calls whatever was handed to it.&lt;/p&gt;




&lt;p&gt;The Three Things a Dev Controls With Callbacks&lt;/p&gt;

&lt;p&gt;Every time you work with a function that takes a callback, there are exactly three decisions you're making:&lt;/p&gt;

&lt;p&gt;1 — The arguments — how many, what type, in what order you pass them. Get this wrong and nothing works.&lt;/p&gt;

&lt;p&gt;2 — What's inside the callback — are you writing the logic inline while calling, or did you build the function separately beforehand and just drop it in?&lt;/p&gt;

&lt;p&gt;3 — How you call the main function — are you passing an anonymous arrow function right there, or a variable that holds a pre-built function?&lt;/p&gt;

&lt;p&gt;These three things cover every variation of the callback pattern you'll ever see. Once you can identify all three in any piece of code, callbacks stop feeling unpredictable.&lt;br&gt;
The Window Object — JavaScript's Outermost Scope&lt;/p&gt;




&lt;p&gt;In the browser, the window object is the global scope — the outermost container that everything lives inside. Functions you define at the top level, variables, even built-in things — they all exist on window.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;window.setTimeout&lt;/code&gt;, window.console, window.alert — these are all just properties on that same object. When you call &lt;code&gt;setTimeout()&lt;/code&gt; without any prefix, JavaScript quietly looks it up on window for you.&lt;/p&gt;




&lt;p&gt;Why map, filter, reduce Are Methods, Not Functions&lt;/p&gt;

&lt;p&gt;This is a subtle but real distinction worth understanding.&lt;/p&gt;

&lt;p&gt;A function is a standalone callable — it exists on its own. A method is a function that lives inside an object.&lt;/p&gt;

&lt;p&gt;map, filter, and reduce live on Array.prototype — which is itself an object. Every array you create inherits from that prototype, which is why you can call .map() on any array. Since they live inside an object (Array.prototype), they are by definition methods, not standalone functions.&lt;/p&gt;

&lt;p&gt;Same applies to object methods — anything sitting inside an object as a function is a method. The distinction matters when you start dealing with this — because methods have an owner, and this points to that owner. Standalone functions don't have one, so this floats up to window.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>useEffect, Callbacks, and How They Work Together</title>
      <dc:creator>Jalaj Bankar</dc:creator>
      <pubDate>Fri, 20 Mar 2026 16:53:58 +0000</pubDate>
      <link>https://dev.to/jalajb/useeffect-callbacks-and-how-they-work-together-3nck</link>
      <guid>https://dev.to/jalajb/useeffect-callbacks-and-how-they-work-together-3nck</guid>
      <description>&lt;h2&gt;
  
  
  Short session but genuinely important stuff. These two concepts — useEffect and callbacks — are everywhere in React and JavaScript. Understanding them properly changes how you read code.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;useEffect&lt;/strong&gt; — When Does It Actually Run?&lt;br&gt;
Simple and worth stating clearly: useEffect runs after every render of the component it lives in. That's its default behaviour — component renders, effect fires. No magic, no mystery.&lt;br&gt;
You control when it runs using the dependency array:&lt;br&gt;
&lt;code&gt;useEffect(() =&amp;gt; { ... }, []);&lt;/code&gt; — runs only once, on first render.&lt;br&gt;
&lt;code&gt;useEffect(() =&amp;gt; { ... }, [value]);&lt;/code&gt; — runs whenever value changes.&lt;br&gt;
&lt;code&gt;useEffect(() =&amp;gt; { ... });&lt;/code&gt; — runs after every single render, no restrictions.&lt;br&gt;
That's the whole mental model. Render happens first, then the effect. Always in that order.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Callbacks&lt;/strong&gt; — A Function That Waits Its Turn&lt;br&gt;
A callback is just a function you hand to another function and say "you decide when to call this."&lt;br&gt;
The flow is always the same: main function runs first → callback runs inside it, wherever it was placed.&lt;br&gt;
&lt;code&gt;function iAmGonnaBeCallback() {&lt;br&gt;
  console.log("I ran second!");&lt;br&gt;
}&lt;br&gt;
function runsInsideMe(callback) {&lt;br&gt;
  console.log("I ran first!");&lt;br&gt;
  callback();&lt;br&gt;
}&lt;br&gt;
runsInsideMe(iAmGonnaBeCallback);&lt;/code&gt;&lt;br&gt;
You're not calling iAmGonnaBeCallback yourself — you're handing it over and letting runsInsideMe decide where it fires. Could be line 1, could be line 555. You don't control that. The parent does.&lt;br&gt;
Three things worth locking in about callbacks:&lt;br&gt;
The callback must be defined before it's passed in — JavaScript needs to know what it is before handing it over.&lt;br&gt;
You pass the function without parentheses — &lt;code&gt;runsInsideMe(iAmGonnaBeCallback)&lt;/code&gt; not &lt;code&gt;runsInsideMe(iAmGonnaBeCallback())&lt;/code&gt;. Parentheses would call it immediately, not pass it.&lt;br&gt;
It runs exactly where it's placed inside the parent — not before, not after.&lt;/p&gt;




&lt;p&gt;How a Callback Saves Your App Inside useEffect&lt;br&gt;
Here's the flow when useEffect handles an API call — and why the callback pattern matters here:&lt;br&gt;
App opens → component renders → useEffect fires immediately after → if there's no callback structure, it tries to fetch data right away → but what if the component isn't ready yet, or you want more control over timing?&lt;br&gt;
The clean pattern is to define your fetch function outside and pass it in — or define it inside the effect and call it properly:&lt;br&gt;
&lt;code&gt;useEffect(() =&amp;gt; {&lt;br&gt;
  function fetchData() {&lt;br&gt;
    // API call here&lt;br&gt;
  }&lt;br&gt;
  fetchData();&lt;br&gt;
}, []);&lt;/code&gt;&lt;br&gt;
The effect runs, then calls your function inside it — exactly like the callback pattern. useEffect is the parent, your fetch function is the callback. It runs where you placed it, when the effect decides. Clean, predictable, no surprises.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>&amp;&amp;, Lexical Scope, Closures, and Why Axios Feels Nicer Than fetch</title>
      <dc:creator>Jalaj Bankar</dc:creator>
      <pubDate>Fri, 20 Mar 2026 16:49:57 +0000</pubDate>
      <link>https://dev.to/jalajb/-lexical-scope-closures-and-why-axios-feels-nicer-than-fetch-53nd</link>
      <guid>https://dev.to/jalajb/-lexical-scope-closures-and-why-axios-feels-nicer-than-fetch-53nd</guid>
      <description>&lt;h2&gt;
  
  
  One of those sessions where the JavaScript fundamentals get a little deeper. These concepts — scope, closures — are the kind of things that separate someone who uses JavaScript from someone who actually understands it.
&lt;/h2&gt;

&lt;p&gt;How &amp;amp;&amp;amp; Actually Works in JavaScript&lt;/p&gt;

&lt;p&gt;Most people think &lt;strong&gt;&amp;amp;&amp;amp;&lt;/strong&gt; just returns true or false. It doesn't — it returns one of the actual values. Here's the full picture:&lt;/p&gt;

&lt;p&gt;If any value is falsy, it returns that falsy value and stops right there. Doesn't even look at the rest.&lt;/p&gt;

&lt;p&gt;If one is truthy and one is falsy, it returns the falsy one.&lt;/p&gt;

&lt;p&gt;If both are falsy, it returns the left side — because that's where it stopped.&lt;/p&gt;

&lt;p&gt;If both are truthy, it returns the right side — because it evaluated everything and the last truthy value wins.&lt;/p&gt;

&lt;p&gt;This is exactly why you see patterns like &lt;code&gt;{isLoggedIn &amp;amp;&amp;amp; &amp;lt;Dashboard /&amp;gt;}&lt;/code&gt; in React. If isLoggedIn is false, &amp;amp;&amp;amp; short-circuits and returns false — nothing renders. If it's true, &amp;amp;&amp;amp; moves to the right side and returns  — which renders. The whole conditional rendering pattern in React is just &amp;amp;&amp;amp; doing its thing.&lt;br&gt;
Lexical Scope — Where You Write It Is What Matters&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Lexical scope&lt;/strong&gt; is the rule that decides which variables a function can "see" and access. In JavaScript, an inner function always has access to its parent function's variables — not because of when it runs, but because of where it was written.&lt;/p&gt;

&lt;p&gt;The word lexical literally means "at the time of lexing" — which is the phase where JavaScript reads your code before running it. The Lexer walks through your code, sees where variables are declared, and locks in their scope right there and then.&lt;/p&gt;

&lt;p&gt;That's also why it's called Static Scope — it doesn't shift. It doesn't matter where or how you call the function later. The scope was decided the moment you wrote it down. No surprises, no dynamic changes.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Closures&lt;/strong&gt; — The "Backpack" a Function Carries&lt;/p&gt;

&lt;p&gt;A closure is what happens when an inner function holds onto its lexical scope even after its parent function has finished running and disappeared from memory.&lt;/p&gt;

&lt;p&gt;Normally when a function finishes executing, its local variables get cleaned up. Gone. But if an inner function was returned or stored somewhere — it takes a backpack with it. That backpack contains every variable from the parent's scope that the inner function needs.&lt;/p&gt;

&lt;p&gt;`function makeCounter() {   let count = 0;   return function() {     count++;     console.log(count);   }; }&lt;/p&gt;

&lt;p&gt;const counter = makeCounter(); counter(); // 1 counter(); // 2 counter(); // 3&lt;br&gt;
`&lt;br&gt;
makeCounter() finished running. count should be dead. But the returned function still has its backpack — count lives on inside the closure. Every call to counter() reaches into that backpack and updates the same count.&lt;/p&gt;

&lt;p&gt;This is one of the most powerful patterns in JavaScript and it shows up everywhere — event handlers, React hooks, module patterns. Once you see the backpack mental model, closures stop feeling scary.&lt;/p&gt;




&lt;p&gt;Why &lt;strong&gt;Axios&lt;/strong&gt; Gets Recommended Over fetch&lt;/p&gt;

&lt;p&gt;Both do the same job — make HTTP requests. But axios is noticeably nicer to work with day-to-day for two reasons:&lt;/p&gt;

&lt;p&gt;Better default response object — when you console.log an axios response, you get a rich object with config, headers, status, request, and your actual data all neatly organised. With fetch you get something much more bare.&lt;/p&gt;

&lt;p&gt;No res.json() step — with fetch you always have to do this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;fetch(url) .then(res =&amp;gt; res.json()) .then(data =&amp;gt; console.log(data));&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;With axios it's already parsed for you:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;axios.get(url) .then(res =&amp;gt; console.log(res.data));&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;One less step every single time. Small thing, but across a whole project it adds up.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>...rest, ...spread, reduce(), and Two JavaScript Tricks That'll Mess With Your Head</title>
      <dc:creator>Jalaj Bankar</dc:creator>
      <pubDate>Fri, 20 Mar 2026 16:47:05 +0000</pubDate>
      <link>https://dev.to/jalajb/rest-spread-reduce-and-two-javascript-tricks-thatll-mess-with-your-head-2g8m</link>
      <guid>https://dev.to/jalajb/rest-spread-reduce-and-two-javascript-tricks-thatll-mess-with-your-head-2g8m</guid>
      <description>&lt;h2&gt;
  
  
  A fun session. Some genuinely useful patterns and two JavaScript behaviours at the end that look like bugs but are actually the language working exactly as designed.
&lt;/h2&gt;

&lt;p&gt;...rest vs ...spread — Same Syntax, Opposite Jobs&lt;/p&gt;

&lt;p&gt;These both use ... but they do completely opposite things depending on which side of the assignment they're on. That's why they're easy to mix up.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;...rest&lt;/code&gt; (Left Hand Side) — gathering things together&lt;/p&gt;

&lt;p&gt;When you see ... on the left side of an assignment or in a function parameter, it's collecting whatever's left into an array:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;function logAll(first, ...rest) {&lt;br&gt;
console.log(first);&lt;br&gt;
console.log(rest);&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;code&gt;logAll(1, 2, 3, 4, 5); // first → 1 // rest → [2, 3, 4, 5]&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Everything that didn't get its own name gets gathered into rest. That's why these are called variadic functions — they can accept any number of arguments.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;...spread&lt;/code&gt; (Right Hand Side) — spreading things apart&lt;/p&gt;

&lt;p&gt;When ... appears on the right side, it's doing the opposite — unpacking an existing array into individual elements:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let arr = [1, 2, 3, 4, 5]; let arr2 = [...arr, 6, 7, 8, 9, 10]; // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You're not copying the array reference — you're spreading out its elements and building a brand new array. This is why spread is so useful for immutable updates in React.&lt;/p&gt;

&lt;p&gt;Simple rule to remember: left side gathers, right side scatters.&lt;/p&gt;




&lt;p&gt;&lt;code&gt;reduce()&lt;/code&gt; — A for Loop With a Memory&lt;/p&gt;

&lt;p&gt;&lt;code&gt;reduce()&lt;/code&gt; is honestly just a cleaner abstraction of the classic accumulator pattern. Here's the same operation written both ways so you can see exactly what it replaces:&lt;/p&gt;

&lt;p&gt;With a for loop:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let arr = [1, 2, 3, 4, 5]; let sum = 0; for (let i = 0; i &amp;lt; arr.length; i++) {   sum += arr[i]; } console.log(sum);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;With reduce():&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let arr = [1, 2, 3, 4, 5]; let sum = (acc, elem) =&amp;gt; acc + elem; let result = arr.reduce(sum, 0); console.log(result);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Same result. reduce() just handles the loop and the accumulator internally so you only have to think about the logic.&lt;/p&gt;

&lt;p&gt;A few things worth locking in about reduce():&lt;/p&gt;

&lt;p&gt;&lt;code&gt;reduce()&lt;/code&gt; &lt;strong&gt;takes two arguments&lt;/strong&gt; — a &lt;strong&gt;callback function&lt;/strong&gt; and the &lt;strong&gt;initial value&lt;/strong&gt; of the accumulator. In the example above that's sum and 0.&lt;/p&gt;

&lt;p&gt;The initial value (0 here) only kicks in for the very first iteration. After that, the accumulator carries whatever value the previous iteration returned.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And importantly&lt;/strong&gt; — respect lexical scoping. Call reduce() after your callback function is defined, not before. JavaScript needs to know what sum is before you reference it.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;JavaScript Trick #1&lt;/strong&gt; — The Accidental Index Selector&lt;/p&gt;

&lt;p&gt;This one looks like an array with two arrays inside it but it's actually something completely different:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let arr = [1, 2, 3, 4, 5][0, 3]; console.log(arr); // Output: 4&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;What's happening here — the second [0, 3] is not a second array. It's bracket notation accessing an index on the first array. And inside it, 0, 3 is the comma operator — which evaluates both expressions left to right and returns the last one. So [0, 3] evaluates to 3, and arr[3] is 4.&lt;/p&gt;

&lt;p&gt;So the whole thing reads as: "give me index 3 of this array" — which is 4. Looks like two arrays, behaves like an index accessor. Wild.&lt;br&gt;
JavaScript Trick #2 — Duplicate Keys in Objects&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let obj = { a: 1, b: 2, a: 3 }; console.log(obj); // Output: { a: 3, b: 2 }&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Objects don't support duplicate keys — just like Sets don't support duplicate values. When JavaScript sees two properties with the same key, the second one overwrites the first. But here's the subtle part — it doesn't just replace the value and move on. It goes back to the first appearance of that key and updates its value there. That's why a stays in its original position in the output but holds the newer value 3.&lt;/p&gt;

&lt;p&gt;So the object ends up as &lt;code&gt;{ a: 3, b: 2 }&lt;/code&gt; — not &lt;code&gt;{ b: 2, a: 3 }&lt;/code&gt;. Position is preserved, value is overwritten.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Server Rendering, Express Routing, JSX Under the Hood, and this Keyword Finally Making Sense</title>
      <dc:creator>Jalaj Bankar</dc:creator>
      <pubDate>Fri, 20 Mar 2026 16:42:49 +0000</pubDate>
      <link>https://dev.to/jalajb/server-rendering-express-routing-jsx-under-the-hood-and-this-keyword-finally-making-sense-55im</link>
      <guid>https://dev.to/jalajb/server-rendering-express-routing-jsx-under-the-hood-and-this-keyword-finally-making-sense-55im</guid>
      <description>&lt;h2&gt;
  
  
  A big session. React internals, some Node territory, and one of the most confusing JavaScript concepts that suddenly clicks when explained the right way. Let's get into it.
&lt;/h2&gt;

&lt;p&gt;Two Types of Server-Side Rendering&lt;br&gt;
These sound similar but they're quite different in how they work:&lt;br&gt;
&lt;strong&gt;Server-Side Rendering (SSR)&lt;/strong&gt; — the entire page is rendered on the server on each request and sent as ready HTML to the browser. Fast first load, good for SEO.&lt;br&gt;
&lt;strong&gt;React Server Components (RSC)&lt;/strong&gt; — a newer model where specific components run only on the server, never shipping their JavaScript to the browser at all. Not just rendering on the server — actually living there permanently. Leaner bundles, better performance.&lt;/p&gt;




&lt;p&gt;Basic Routing in Express&lt;br&gt;
Express makes routing straightforward — you define a path and what should happen when someone hits it. Learned the basics today, more on this as it gets deeper.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm run dev&lt;/code&gt; vs &lt;code&gt;npm run build&lt;/code&gt;&lt;br&gt;
Easy to confuse early on but the difference matters:&lt;br&gt;
&lt;code&gt;npm run dev&lt;/code&gt; — spins up a temporary development server in memory. Nothing is written to disk. Fast, hot-reloading, meant for development only.&lt;br&gt;
&lt;code&gt;npm run build&lt;/code&gt; — creates permanent, optimised files in a dist/ folder. This is what actually gets deployed to production. Minified, bundled, ready for the real world.&lt;/p&gt;

&lt;p&gt;Three Ways to Create an Element — JS, JSX, and Raw React&lt;br&gt;
This is one of those comparisons that makes JSX suddenly feel less magical.&lt;br&gt;
Plain JavaScript:&lt;br&gt;
&lt;code&gt;let H1 = document.createElement('h1');&lt;br&gt;
H1.textContent = "Hello World";&lt;br&gt;
React + JSX:&lt;br&gt;
const H1 = (&lt;br&gt;
  &amp;lt;h1&amp;gt;Hello World!&amp;lt;/h1&amp;gt;&lt;br&gt;
);&lt;/code&gt;&lt;br&gt;
React without JSX (what JSX actually compiles to):&lt;br&gt;
&lt;code&gt;React.createElement('h1', {className: 'greet'}, "Hello World!");&lt;br&gt;
And what React actually holds in memory after that — a plain JavaScript object:&lt;br&gt;
{&lt;br&gt;
  type: 'h1',&lt;br&gt;
  props: {&lt;br&gt;
    className: 'greet',&lt;br&gt;
    children: "Hello World!"&lt;br&gt;
  }&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
JSX is just syntactic sugar. Under the hood it's always React.createElement producing a plain object. The browser never sees JSX — Babel transforms it before it gets there.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;useRef()&lt;/strong&gt; — Reaching Into the DOM&lt;br&gt;
&lt;code&gt;useRef()&lt;/code&gt; gives you a way to directly reference a DOM element from inside your component — without triggering a re-render when it changes. Useful for things like focusing an input, reading scroll position, or integrating with third-party libraries that need a real DOM node.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;useContext()&lt;/strong&gt; — Skipping the Prop Chain&lt;br&gt;
Normally if component 1 has data that component 7 needs, you'd pass props through every component in between. useContext() skips all of that.&lt;br&gt;
Step 1 — Create the context:&lt;br&gt;
&lt;code&gt;const AppContext = createContext();&lt;/code&gt;&lt;br&gt;
Step 2 — Wrap your parent and put data on the value prop:&lt;br&gt;
&lt;code&gt;&amp;lt;AppContext.Provider value={text}&amp;gt;&lt;br&gt;
  &amp;lt;App /&amp;gt;&lt;br&gt;
&amp;lt;/AppContext.Provider&amp;gt;&lt;/code&gt;&lt;br&gt;
Step 3 — Grab it anywhere down the tree:&lt;br&gt;
&lt;code&gt;function Title() {&lt;br&gt;
  const text = useContext(AppContext);&lt;br&gt;
  return &amp;lt;h1&amp;gt;{text}&amp;lt;/h1&amp;gt;;&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
No prop drilling. Component 7 just reaches up and grabs what it needs directly.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Portals&lt;/strong&gt; — Rendering Outside Your Component Tree&lt;br&gt;
Sometimes you need a component to visually break out of its parent — modals, dropdowns, tooltips. Portals let you render a component into any DOM element, not just its parent:&lt;br&gt;
createPortal(&lt;/p&gt;I am in the document body., document.body)&lt;br&gt;
The component still lives in your React tree logically — events bubble normally — but it physically renders wherever you point it.



&lt;p&gt;Suspense — Waiting for Things to Load&lt;br&gt;
Suspense lets you define a fallback UI while something is loading:&lt;br&gt;
&lt;code&gt;&amp;lt;Suspense fallback={&amp;lt;p&amp;gt;Loading...&amp;lt;/p&amp;gt;}&amp;gt;&lt;br&gt;
  &amp;lt;SlowComponent /&amp;gt;&lt;br&gt;
&amp;lt;/Suspense&amp;gt;&lt;/code&gt;&lt;br&gt;
Pairs really cleanly with lazy() for loading components only when they're actually needed:&lt;br&gt;
&lt;code&gt;const Component = lazy(() =&amp;gt; import('./Component'));&lt;br&gt;
&amp;lt;Suspense fallback={&amp;lt;p&amp;gt;Loading...&amp;lt;/p&amp;gt;}&amp;gt;&lt;br&gt;
  &amp;lt;Component /&amp;gt;&lt;br&gt;
&amp;lt;/Suspense&amp;gt;&lt;/code&gt;&lt;br&gt;
The component's JavaScript doesn't even download until it's needed. Great for performance on larger apps.&lt;/p&gt;




&lt;p&gt;&lt;code&gt;**this**&lt;/code&gt; Keyword — It's About Who Called It, Not Where It Lives&lt;br&gt;
This is one of those JavaScript concepts that confuses everyone until it's explained the right way. The rule is simple: this looks for whoever called it.&lt;br&gt;
In a browser function, this points to the window object. In Node.js, it points to the global object.&lt;br&gt;
Inside an object method, this refers to that object — because the object is the one calling it.&lt;br&gt;
Here's where it gets interesting:&lt;br&gt;
&lt;code&gt;const user = {&lt;br&gt;
  name: "Deep",&lt;br&gt;
  logName: function() { console.log(this.name); }&lt;br&gt;
};&lt;/code&gt;&lt;br&gt;
user.logName(); ✅ — outputs "Deep" because user is calling it. this obeys user.&lt;br&gt;
const standAlone = user.logName;&lt;br&gt;
standAlone(); ❌ — outputs undefined because now a plain variable is calling it, not an object. this has no object to obey so it climbs up to window — and window.name is empty.&lt;br&gt;
Same function. Different caller. Completely different result. this doesn't care where the function was defined — it only cares about who invoked it. Once that mental model locks in, this stops being scary.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>react</category>
      <category>javascript</category>
      <category>node</category>
    </item>
    <item>
      <title>What Actually Happens When You Type google.com — And All the Terms Behind It</title>
      <dc:creator>Jalaj Bankar</dc:creator>
      <pubDate>Fri, 20 Mar 2026 11:54:11 +0000</pubDate>
      <link>https://dev.to/jalajb/what-actually-happens-when-you-type-googlecom-and-all-the-terms-behind-it-2an2</link>
      <guid>https://dev.to/jalajb/what-actually-happens-when-you-type-googlecom-and-all-the-terms-behind-it-2an2</guid>
      <description>&lt;h3&gt;
  
  
  This one goes deep. Understanding what happens in those few milliseconds between hitting Enter and seeing a webpage is one of those things that makes you look at the internet completely differently. Let's walk through it properly.
&lt;/h3&gt;

&lt;p&gt;The Journey of a &lt;strong&gt;Single Request&lt;/strong&gt;&lt;br&gt;
Step 1 — You type google.com and hit Enter&lt;br&gt;
Simple enough. But what happens next is anything but.&lt;br&gt;
Step 2 — DNS Lookup: Finding the Address&lt;br&gt;
Your browser doesn't understand names — it understands IP addresses. So first it needs to translate google.com into something like 142.250.195.46. It checks in this order:&lt;br&gt;
Local cache → ISP → Root server → gets the Mumbai IP (or wherever you're closest to)&lt;br&gt;
Think of DNS as the internet's phonebook. You give it a name, it gives you a number.&lt;br&gt;
Step 3 — TCP Handshake: Building the Road&lt;br&gt;
Before any data moves, a reliable connection needs to be established. This is the TCP handshake — using SYN and ACK messages back and forth to essentially say "hey, can you hear me?" — "yes, can you hear me?" — "yes, let's go." Think of it as road construction before traffic can flow.&lt;br&gt;
Step 4 — TLS Handshake: Locking the Road&lt;br&gt;
The road exists, but it's not secure yet. The TLS handshake encrypts the connection so nobody in the middle can read what's being sent. Once this is done, HTTP becomes HTTPS — the S literally stands for the TLS layer wrapping the connection.&lt;br&gt;
Step 5 — HTTP Request: The Actual Conversation&lt;br&gt;
Now the browser finally asks for the page. "Give me google.com." The server responds with HTML, CSS, JavaScript — everything needed to render what you see.&lt;br&gt;
Step 6 — Page Rendered&lt;/p&gt;

&lt;h2&gt;
  
  
  Your browser takes all that data and paints the page. What feels instant is actually all six of these steps happening in milliseconds.
&lt;/h2&gt;

&lt;p&gt;The 2026 Cool Fact — &lt;strong&gt;0-RTT&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  If you've visited Google recently, Steps 3 and 4 can happen almost simultaneously — this is called 0-RTT (Zero Round-Trip Time). It's a feature in TLS 1.3 that lets your browser skip the full handshake on reconnection and send data immediately. The result? The site feels like it loaded instantly. This is why returning visits always feel faster than first visits.
&lt;/h2&gt;

&lt;p&gt;The Glossary — &lt;strong&gt;Security &amp;amp; Protocol Terms&lt;/strong&gt;&lt;br&gt;
TLS — Transport Layer Security. The current standard for encrypting connections.&lt;br&gt;
SSL — Secure Sockets Layer. The older, now-deprecated version of TLS. You'll still hear people say "SSL certificate" but they almost always mean TLS at this point.&lt;br&gt;
HTTP — Hypertext Transfer Protocol. The language browsers and servers use to talk.&lt;br&gt;
HTTPS — HTTP + TLS. The secure version. Always look for this in your browser bar.&lt;br&gt;
HSTS — HTTP Strict Transport Security. Forces your browser to only use HTTPS for a site — even if you type http:// manually. A site can tell your browser "never connect to me without encryption."&lt;/p&gt;

&lt;h2&gt;
  
  
  0-RTT — Zero Round-Trip Time. High-speed reconnection feature in TLS 1.3.
&lt;/h2&gt;

&lt;p&gt;The Glossary — &lt;strong&gt;Networking &amp;amp; Infrastructure&lt;/strong&gt;&lt;br&gt;
IP — Internet Protocol. The addressing system of the internet.&lt;br&gt;
IPv4 / IPv6 — Version 4 uses addresses like 192.168.1.1. Version 6 was introduced because we ran out of IPv4 addresses — there are only about 4 billion of them and the internet has way more devices than that now.&lt;br&gt;
TCP — Transmission Control Protocol. Reliable, ordered delivery. The "road builder."&lt;br&gt;
UDP — User Datagram Protocol. Faster but doesn't guarantee delivery — used in HTTP/3, video calls, gaming. Speed matters more than perfection there.&lt;br&gt;
DNS — Domain Name System. Translates google.com into an IP address.&lt;/p&gt;

&lt;h2&gt;
  
  
  ISP — Internet Service Provider. The company you pay for internet access.
&lt;/h2&gt;

&lt;p&gt;The Glossary —** Advanced Concepts**&lt;br&gt;
MUX (Multiplexing) — Sending multiple signals through one path simultaneously. HTTP/2 and HTTP/3 use this so multiple files load in parallel over a single connection instead of queuing up.&lt;br&gt;
GGC — Google Global Cache. Google literally places their own servers inside ISP buildings around the world so your YouTube video doesn't have to travel halfway across the planet. Fewer hops, faster delivery.&lt;br&gt;
IoT — Internet of Things. Smart devices — cameras, thermostats, fridges — anything connected to the internet that isn't a traditional computer.&lt;br&gt;
TLD — Top-Level Domain. The .com, .org, .in part of a URL.&lt;br&gt;
SYN / ACK — Synchronize / Acknowledgement. The specific messages exchanged during the TCP handshake.&lt;/p&gt;

&lt;h2&gt;
  
  
  RTT — Round-Trip Time. How long it takes a signal to travel to a server and come back. Lower is better.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Domain Hierarchy&lt;/strong&gt; — Reading Right to Left&lt;br&gt;
Most people read a domain left to right — but the internet reads it right to left. Here's the full tree:&lt;br&gt;
Root Level — The invisible dot at the very end of every URL (google.com.). All DNS lookups start here.&lt;br&gt;
TLD (Top-Level Domain) — The extension after the last dot. .com, .org, .in. Categorises the site by purpose or region.&lt;br&gt;
SLD (Second-Level Domain) — What most people call "the website name." The google in google.com.&lt;br&gt;
Subdomain (Third Level) — Prefixes that organise sections of a site. The docs in docs.google.com.&lt;br&gt;
Lower Levels — Technically up to 127 levels deep, though more than four is rare in practice. Something like dev.blog.google.com would be a fourth-level domain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Special Case — ccSLD — Some countries add a category at the second level. So instead of google.com, you get google.co.uk — where .uk is the country, .co is the category, and google is pushed to the third level.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;SMTP, POP3, and IMAP&lt;/strong&gt; — Email Has Three Jobs&lt;br&gt;
Here's something most people don't realise — email uses different protocols for sending vs receiving, and they're completely separate:&lt;br&gt;
SMTP (Simple Mail Transfer Protocol) — only for sending mail. That's its one job. When you hit send, SMTP takes over.&lt;br&gt;
POP3 (Post Office Protocol 3) — for reading mail. Downloads emails to your device and typically removes them from the server. Old school.&lt;/p&gt;

&lt;h2&gt;
  
  
  IMAP (Internet Message Access Protocol) — also for reading, but smarter. Keeps emails on the server and syncs across all your devices. This is why your phone and laptop show the same inbox.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;DHCP&lt;/strong&gt; — How Your Device Gets an IP Address Automatically&lt;br&gt;
Every device on a network needs an IP address. But you've never manually typed one in (probably). That's DHCP doing its job silently.&lt;br&gt;
When you connect your phone to your router, your phone is the host — and it needs an IP, a subnet mask, a default gateway, and DNS settings to function on the network. DHCP handles all of that automatically through a four-step process called DORA:&lt;br&gt;
Discover — your device shouts "is there a DHCP server here?"&lt;br&gt;
Offer — the router replies "yes, here's an IP you can use"&lt;br&gt;
Request — your device says "great, I'll take that one"&lt;br&gt;
Acknowledge — the router confirms "it's yours"&lt;br&gt;
One network, one default gateway, one IP address assigned cleanly — and just like that your device is on the internet without you having to configure anything.&lt;/p&gt;

</description>
      <category>networking</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
