<?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: Sylwia Laskowska</title>
    <description>The latest articles on DEV Community by Sylwia Laskowska (@sylwia-lask).</description>
    <link>https://dev.to/sylwia-lask</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%2F3535771%2Fe22860d5-274b-43c9-819b-56b162e5bd5a.jpeg</url>
      <title>DEV Community: Sylwia Laskowska</title>
      <link>https://dev.to/sylwia-lask</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sylwia-lask"/>
    <language>en</language>
    <item>
      <title>The Real Skill in Programming Is Debugging. Everything Else Is Copy-Paste</title>
      <dc:creator>Sylwia Laskowska</dc:creator>
      <pubDate>Thu, 05 Mar 2026 08:17:23 +0000</pubDate>
      <link>https://dev.to/sylwia-lask/the-real-skill-in-programming-is-debugging-everything-else-is-copy-paste-i39</link>
      <guid>https://dev.to/sylwia-lask/the-real-skill-in-programming-is-debugging-everything-else-is-copy-paste-i39</guid>
      <description>&lt;p&gt;I have a feeling this statement is even more true in the age of AI and coding agents. Sure, today we often write prompts instead of code. But if we’re honest, isn’t that just an extremely fast version of copy-paste?&lt;/p&gt;




&lt;p&gt;When people imagine programmers, the picture is usually quite dramatic. In the most optimistic version, it's a handsome hacker sitting in a basement full of computers with Angelina Jolie, breaking into bank systems and secret Pentagon databases. &lt;/p&gt;

&lt;p&gt;A slightly less romantic but still impressive image is a developer hammering the keyboard at insane speed while lines of code cascade down the screen like in &lt;em&gt;The Matrix&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;And to be fair, when you start learning programming, that vision is not entirely wrong (except of course Angelina Jolie). You actually write a lot of code.&lt;/p&gt;

&lt;p&gt;Someone even commented under my article&lt;br&gt;
&lt;a href="https://dev.to/sylwia-lask/your-github-contribution-graph-means-absolutely-nothing-and-heres-why-2kjc"&gt;Your GitHub Contribution Graph Means Absolutely Nothing (And Here's Why)&lt;/a&gt;&lt;br&gt;
that the greenest contribution graphs are often from aspiring developers who are simply learning by doing — coding every day, trying things out, experimenting. That’s completely natural.&lt;/p&gt;

&lt;p&gt;I often talk with junior and mid developers, and many of them understand the job exactly this way: your role is to deliver features. Ship code. And honestly, there is absolutely nothing wrong with that.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Small personal update: I recently got accepted into the&lt;/em&gt; &lt;strong&gt;AWS Community Builders&lt;/strong&gt; &lt;em&gt;program 🎉I hope they give out cool hats and t-shirts 😅 If you feel like supporting me, you can leave a like on my LinkedIn post &lt;a href="https://www.linkedin.com/posts/sylwia-laskowska-5a8467131_awscommunitybuilders-awscommunity-devtools-activity-7434959108245602304-3LIc?utm_source=share&amp;amp;utm_medium=member_desktop&amp;amp;rcm=ACoAACBIGJABwz0qrMhjd-mEKrpauBXqa_cSD9M" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  But What Happens Later?
&lt;/h2&gt;

&lt;p&gt;Something interesting happens as you move further in your career.&lt;/p&gt;

&lt;p&gt;The more senior you become — and the more responsibility you have for the system — the less time you actually spend writing code.&lt;/p&gt;

&lt;p&gt;Instead, more and more of your time goes into debugging, investigating strange issues, and generally solving problems that nobody else managed to solve.&lt;/p&gt;

&lt;p&gt;You can think now: but some seniors still code a lot!&lt;/p&gt;

&lt;p&gt;And yes, if you are an experienced developer working in a small startup, you will probably still spend a lot of time writing code. Especially now, when AI tools can accelerate development so much.&lt;/p&gt;

&lt;p&gt;But as projects grow and become more successful, their complexity grows as well. And with complexity comes a different kind of work.&lt;/p&gt;

&lt;p&gt;Less writing code. More understanding systems. Because when something breaks in production, someone has to investigate it.&lt;/p&gt;

&lt;p&gt;Suddenly the support team needs answers. Right now!&lt;br&gt;
Then you spend the whole day analyzing logs.&lt;br&gt;
Oh, there is a race condition somewhere! You're a senior, you need to investigate it.&lt;br&gt;
Is something wrong with our configuration? You need to figure it out!&lt;/p&gt;

&lt;p&gt;And of course juniors always will come with the most famous developer question of all:&lt;/p&gt;

&lt;p&gt;“Why is this &lt;code&gt;null&lt;/code&gt;?”&lt;/p&gt;




&lt;h2&gt;
  
  
  Wait… Isn’t Programming Also About Architecture?
&lt;/h2&gt;

&lt;p&gt;Now you might say: programming is not just debugging. Developers also need to choose architectures, frameworks, and technology stacks.&lt;/p&gt;

&lt;p&gt;That’s absolutely true.&lt;/p&gt;

&lt;p&gt;But the longer I work in this industry, the more I realize that in many areas &lt;strong&gt;almost everything has already been invented&lt;/strong&gt;. There are design patterns, well-known architectural approaches, and proven solutions to many classes of problems.&lt;/p&gt;

&lt;p&gt;When you design a system, you rarely invent everything from scratch. Instead, you reuse patterns that worked before, adapt architectures that others already tested, and build on the collective knowledge of the developer community.&lt;/p&gt;

&lt;p&gt;In that sense, architecture itself is often a kind of copy-paste — just at a much higher level.&lt;/p&gt;

&lt;p&gt;Ignoring all that accumulated knowledge would be either genius… or stupidity.&lt;/p&gt;




&lt;h2&gt;
  
  
  When I Was a Junior
&lt;/h2&gt;

&lt;p&gt;When I was a junior developer, I was shipping feature after feature. I must have written &lt;strong&gt;kilometers of code&lt;/strong&gt; back then. If something didn’t work, I would spend some time researching, trying things, googling errors. If I still couldn’t fix it, I simply went to a senior developer.&lt;/p&gt;

&lt;p&gt;And that was it. No matter how annoying and how time-consuming the issue was, the senior had to solve it. That was literally his job.&lt;/p&gt;

&lt;p&gt;I remember one situation from that time when the project on my local machine suddenly stopped building. I spent hours trying to figure it out, until a senior checked a few things and calmly said: “Your Node version is wrong.” That was the whole mystery.&lt;/p&gt;

&lt;p&gt;Back then I also felt a bit sorry for seniors. They were always on calls, constantly interrupted, rarely writing actual code. Meanwhile I was happily implementing feature after feature. Infrastructure? Pipelines? AWS? I barely even thought about those things.&lt;/p&gt;




&lt;h2&gt;
  
  
  Today
&lt;/h2&gt;

&lt;p&gt;I’m now a senior developer myself, and I even have to coordinate work across multiple teams. Do I still write code? Of course. But do I deliver huge numbers of new features like I did when I was a junior?&lt;/p&gt;

&lt;p&gt;Not really.&lt;/p&gt;

&lt;p&gt;Instead, a lot of my work looks like this: upgrading a framework and trying to understand why everything suddenly breaks. Checking whether a dependency update introduced a regression. Investigating strange bugs that appear only in certain environments.&lt;/p&gt;

&lt;p&gt;Remember these famous frontend CVE we had recently? The kind that suddenly appears everywhere and triggers a small wave of panic.&lt;/p&gt;

&lt;p&gt;Does it affect our project? Fortunately not.&lt;/p&gt;

&lt;p&gt;Now the only remaining task is spending a week replying to emails explaining that &lt;strong&gt;we don’t even use React&lt;/strong&gt; 😉&lt;/p&gt;




&lt;h2&gt;
  
  
  The Real Skill
&lt;/h2&gt;

&lt;p&gt;Writing code can look like copy-paste. Architecture is just a high-level copy-paste. But debugging is pure problem solving.&lt;/p&gt;

&lt;p&gt;It forces you to understand the system deeply, follow data flows, analyze logs, and test hypotheses. Sometimes no Stack Overflow answer helps. Sometimes AI tools don’t help either.&lt;/p&gt;

&lt;p&gt;You simply need to think.&lt;/p&gt;

&lt;p&gt;And after hours of investigation, the root cause often turns out to be something surprisingly small: a missing property, an incorrect configuration, or a single line of code.&lt;/p&gt;

&lt;p&gt;Debugging sometimes feels a lot like detective work.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Responsibility
&lt;/h2&gt;

&lt;p&gt;This reminds me one story.&lt;/p&gt;

&lt;p&gt;Remember that senior that had to help me no matter what? Now I'm that senior for my teammates. &lt;/p&gt;

&lt;p&gt;Some time ago, a junior developer came to me because, while implementing a complex form, he hadn’t noticed that validation wasn’t working in one place. He had no idea how to fix it and had already been stuck on it for quite a while. Deadlines were approaching.&lt;/p&gt;

&lt;p&gt;I tried to guide him, pointing out a few places in the code that might help, but it didn’t work. In the end, I had to sit down and dig into that piece of code myself.&lt;/p&gt;

&lt;p&gt;The day before the deadline (I finished at 1 a.m.). &lt;/p&gt;

&lt;p&gt;Was it stressful? Maybe. Should he inform me about this issue earlier? Absolutely. But sometimes that's the reality.&lt;/p&gt;

&lt;h2&gt;
  
  
  So… Am I Unhappy About That?
&lt;/h2&gt;

&lt;p&gt;Do I feel unsatisfied because I don’t ship as many features as I did when I was a junior?&lt;/p&gt;

&lt;p&gt;Not at all.&lt;/p&gt;

&lt;p&gt;After all — who didn’t want to become a detective as a kid?&lt;/p&gt;

&lt;p&gt;Senior developers are basically &lt;strong&gt;software detectives&lt;/strong&gt;. 🕵️‍♀️&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>discuss</category>
      <category>programming</category>
    </item>
    <item>
      <title>16 Modern JavaScript Features That Might Blow Your Mind</title>
      <dc:creator>Sylwia Laskowska</dc:creator>
      <pubDate>Wed, 25 Feb 2026 11:26:10 +0000</pubDate>
      <link>https://dev.to/sylwia-lask/16-modern-javascript-features-that-might-blow-your-mind-4h5e</link>
      <guid>https://dev.to/sylwia-lask/16-modern-javascript-features-that-might-blow-your-mind-4h5e</guid>
      <description>&lt;p&gt;Ah, what a time to be alive!&lt;br&gt;
As usual, I’ve taken way too much on my plate — there were just too many things that looked interesting 😄 Right now I feel like I have ten parallel storylines running in my life and not enough hands to handle them all.&lt;/p&gt;

&lt;p&gt;But let’s be honest — I’m not going to skip my weekly post.&lt;br&gt;
That said… this time I won’t dare to go for a deep dive again. Let’s keep it lighter 😉&lt;/p&gt;

&lt;p&gt;Some time ago, one of my posts got surprisingly popular:&lt;br&gt;
&lt;a href="https://dev.to/sylwia-lask/stop-installing-libraries-10-browser-apis-that-already-solve-your-problems-35bi"&gt;Stop Installing Libraries: 10 Browser APIs That Already Solve Your Problems&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Apparently, these kinds of curated lists are something the community really needs.&lt;/p&gt;

&lt;p&gt;Sure, we have documentation. Sure, we can Google everything — or ask Claude, GPT or Gemini. But there’s one small problem: before you can search for something, you first need to know that it exists.&lt;/p&gt;

&lt;p&gt;So this time I decided to go through a handful of newer additions to the ECMAScript standard — features that landed in recent years and are already available in modern environments.&lt;/p&gt;

&lt;p&gt;This topic isn’t new to me. Back in 2019, I gave a talk at meet.js Summit called “Beyond ES6 — What Comes After the Hype?” (or something along those lines 😄). If for some reason you’d like to revisit ECMAScript features from 2015–2019, you can probably still find the recording somewhere on YouTube.&lt;/p&gt;

&lt;p&gt;Alright, enough intro.&lt;/p&gt;

&lt;p&gt;Below you’ll find some of my favorite modern JavaScript features from recent years. I’m not listing everything — only the ones that feel practical, interesting, or quietly powerful.&lt;/p&gt;

&lt;p&gt;And as you’ll see… they all connect into a bigger pattern.&lt;/p&gt;


&lt;h2&gt;
  
  
  📅 ES2022 — The Foundation of Modern JS
&lt;/h2&gt;
&lt;h2&gt;
  
  
  ✨ Top-Level &lt;code&gt;await&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What problem it solves:&lt;/strong&gt;&lt;br&gt;
A nice quality-of-life improvement. Before this, you couldn’t use &lt;code&gt;await&lt;/code&gt; directly at the top level of a module. You had to wrap everything inside an async function just to load config or initialize data. Not the worst thing ever — but honestly a bit pointless.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Old way (extra boilerplate):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;init&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetchConfig&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nf"&gt;startApp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nf"&gt;init&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Now:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetchConfig&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nf"&gt;startApp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;br&gt;
Cleaner startup logic, less ceremony, easier reading.&lt;/p&gt;


&lt;h2&gt;
  
  
  🔒 Private Class Fields (&lt;code&gt;#&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What problem it solves:&lt;/strong&gt;&lt;br&gt;
Let’s be honest — JavaScript never really had private class fields. We just pretended it did, creating weird conventions like &lt;code&gt;_privateVar&lt;/code&gt;, which wasn’t private at all 😉 (well… unless you were using TypeScript).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Trying to access &lt;code&gt;user.#id&lt;/code&gt; outside the class throws an error.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;br&gt;
Real encapsulation. Safer abstractions and fewer accidental modifications.&lt;/p&gt;


&lt;h2&gt;
  
  
  🧠 &lt;code&gt;Error.cause&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What problem it solves:&lt;/strong&gt;&lt;br&gt;
How many times have you lost half a day debugging because one error triggered another, but the connection between them was almost impossible to trace?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Old way:&lt;/strong&gt; overwrite the error or manually attach metadata.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Failed to load data&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;cause&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;originalError&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;br&gt;
Better debugging and logging. You can track the full chain of failures instead of guessing.&lt;/p&gt;


&lt;h2&gt;
  
  
  🎯 &lt;code&gt;Object.hasOwn()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What problem it solves:&lt;/strong&gt;&lt;br&gt;
Back in the day, checking if an object really had a property required creating this confusing monster:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Old way:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;prototype&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hasOwnProperty&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;key&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Now:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hasOwn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;key&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;br&gt;
Cleaner syntax, easier to read, fewer edge-case surprises.&lt;/p&gt;


&lt;h2&gt;
  
  
  📍 &lt;code&gt;.at()&lt;/code&gt; — Relative Indexing
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What problem it solves:&lt;/strong&gt;&lt;br&gt;
Classic junior interview question: how do you get the last element of an array? Everyone above junior level eventually learned the same ugly hack.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Old way:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Now:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;at&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;br&gt;
Maybe not revolutionary, but definitely clearer and more readable.&lt;/p&gt;


&lt;h2&gt;
  
  
  📅 ES2023 — The Immutability Upgrade
&lt;/h2&gt;

&lt;p&gt;This release focuses on one big idea: &lt;strong&gt;avoid accidental mutation&lt;/strong&gt;.&lt;/p&gt;


&lt;h2&gt;
  
  
  🧹 &lt;code&gt;toSorted()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;Array.sort()&lt;/code&gt; is great… except it mutates the original array. Someone forgets that — and suddenly half your app is broken. Others remember, so they manually clone arrays every time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Old workaround:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;[...&lt;/span&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Now:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sorted&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toSorted&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What it changes:&lt;/strong&gt;&lt;br&gt;
You get a sorted copy without touching the original data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;br&gt;
Huge for state management and functional-style code.&lt;/p&gt;


&lt;h2&gt;
  
  
  🔁 &lt;code&gt;toReversed()&lt;/code&gt; &amp;amp; &lt;code&gt;toSpliced()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Same philosophy: copy instead of mutate.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toReversed&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toSpliced&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;br&gt;
Predictability. You don’t accidentally break code sharing the same array reference.&lt;/p&gt;


&lt;h2&gt;
  
  
  🔎 &lt;code&gt;findLast()&lt;/code&gt; / &lt;code&gt;findLastIndex()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt;&lt;br&gt;
We had &lt;code&gt;find&lt;/code&gt;, but what if you wanted the &lt;em&gt;last&lt;/em&gt; matching element? The old workaround was… not exactly pretty, and definitely confusing for juniors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Old way:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;[...&lt;/span&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;reverse&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Now:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findLast&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;br&gt;
Less noise, clearer intent — the code says exactly what you mean.&lt;/p&gt;


&lt;h2&gt;
  
  
  📅 ES2024 — Data Transformation &amp;amp; Async Control
&lt;/h2&gt;
&lt;h2&gt;
  
  
  🧩 &lt;code&gt;Object.groupBy()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt;&lt;br&gt;
Grouping arrays usually meant writing reducers that looked more complex than the problem itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Old way:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;role&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;??=&lt;/span&gt; &lt;span class="p"&gt;[]).&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;{});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Now:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;grouped&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;groupBy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;u&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;role&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;br&gt;
Massive readability upgrade. What used to be a helper function is now a one-liner.&lt;/p&gt;


&lt;h2&gt;
  
  
  ⚡ &lt;code&gt;Promise.withResolvers()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt;&lt;br&gt;
Creating external &lt;code&gt;resolve&lt;/code&gt; / &lt;code&gt;reject&lt;/code&gt; handlers was always awkward.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Old way:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;promise&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;resolve&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Now:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;promise&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;reject&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
  &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;withResolvers&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;br&gt;
Cleaner async orchestration — especially for queues, events, or complex flows.&lt;/p&gt;


&lt;h2&gt;
  
  
  📦 Resizable ArrayBuffer
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt;&lt;br&gt;
Buffers used to have fixed sizes, which was frustrating when working with streaming or dynamic data — especially if you were one of those weirdos (like me 😄) experimenting with edge JavaScript, workers, or binary data.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;buffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ArrayBuffer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;maxByteLength&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;br&gt;
More flexible memory handling for advanced scenarios.&lt;/p&gt;


&lt;h2&gt;
  
  
  📅 ES2025 — Functional JavaScript Gets Serious
&lt;/h2&gt;
&lt;h2&gt;
  
  
  🧠 Iterator Helpers
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt;&lt;br&gt;
Array methods are great — but they create intermediate arrays at each step. Sometimes that’s unnecessary work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Old way (creates extra arrays):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each step allocates a new array.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now (lazy processing):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;iterator&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;take&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toArray&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What it replaces:&lt;/strong&gt;&lt;br&gt;
Manual generator pipelines or performance-heavy array chains.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;values are processed step by step (lazy evaluation)&lt;/li&gt;
&lt;li&gt;fewer allocations&lt;/li&gt;
&lt;li&gt;better performance on large datasets&lt;/li&gt;
&lt;li&gt;more functional-style pipelines&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think: streaming mindset instead of “build another array”.&lt;/p&gt;


&lt;h2&gt;
  
  
  🧩 New Set Methods
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt;&lt;br&gt;
More advanced set logic always required custom helpers or awkward conversions to arrays.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Old way:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;intersection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;[...&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;has&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Now:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;intersection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;union&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;difference&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;br&gt;
Math-like operations directly in the language. Less boilerplate, clearer intent.&lt;/p&gt;


&lt;h2&gt;
  
  
  🔐 &lt;code&gt;RegExp.escape()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt;&lt;br&gt;
Security. Building regular expressions from user input could easily break the pattern or even introduce vulnerabilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Old way:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;safe&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;userInput&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;.*+?^${}()|[&lt;/span&gt;&lt;span class="se"&gt;\]\\]&lt;/span&gt;&lt;span class="sr"&gt;/g&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;$&amp;amp;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;regex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;RegExp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;safe&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Now:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;regex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;RegExp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;RegExp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;escape&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userInput&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;br&gt;
Safer regex creation without writing your own helper every time.&lt;/p&gt;


&lt;h2&gt;
  
  
  ⚡ &lt;code&gt;Promise.try()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt;&lt;br&gt;
Sometimes you want to treat sync and async code the same way — especially when a sync function might throw.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;mightThrow&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;br&gt;
Everything becomes promise-based automatically, which simplifies error handling pipelines.&lt;/p&gt;


&lt;h2&gt;
  
  
  🧊 Float16 Support
&lt;/h2&gt;

&lt;p&gt;JavaScript has always been a bit awkward with numbers — the default is 64-bit floating point. We’ve had &lt;code&gt;Float32Array&lt;/code&gt; for a while, which was already useful, but now JS goes one step further.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Float16Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What this actually means:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;smaller numeric representation (16-bit)&lt;/li&gt;
&lt;li&gt;lower memory usage&lt;/li&gt;
&lt;li&gt;faster data transfer in some GPU/ML scenarios&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;br&gt;
Graphics, WebGPU, machine learning, and performance-oriented workloads benefit from more compact data.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧭 The Bigger Picture
&lt;/h2&gt;

&lt;p&gt;If you zoom out, you’ll notice a pattern:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;less mutation&lt;/li&gt;
&lt;li&gt;clearer intent&lt;/li&gt;
&lt;li&gt;safer async handling&lt;/li&gt;
&lt;li&gt;more functional data processing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;JavaScript isn’t changing through flashy revolutions anymore.&lt;br&gt;
It’s evolving through small, practical upgrades that quietly make everyday code cleaner and easier to reason about.&lt;/p&gt;

&lt;p&gt;And honestly — that’s the kind of evolution I like most 🙂&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>frontend</category>
      <category>node</category>
    </item>
    <item>
      <title>If You See These Red Flags in an IT Interview — Run (Real Stories)</title>
      <dc:creator>Sylwia Laskowska</dc:creator>
      <pubDate>Wed, 18 Feb 2026 10:54:17 +0000</pubDate>
      <link>https://dev.to/sylwia-lask/if-you-see-these-red-flags-in-an-it-interview-run-real-stories-4am7</link>
      <guid>https://dev.to/sylwia-lask/if-you-see-these-red-flags-in-an-it-interview-run-real-stories-4am7</guid>
      <description>&lt;p&gt;We often prepare for interviews by polishing our CVs, grinding LeetCode, and rehearsing answers to “What’s your biggest weakness?”&lt;br&gt;
But we rarely talk about the other side of the table.&lt;/p&gt;

&lt;p&gt;Because interviews aren’t just about companies evaluating candidates.&lt;br&gt;
They’re also a window into how a company thinks, communicates, and treats people.&lt;/p&gt;

&lt;p&gt;And sometimes, that window shows more red flags than a beach on a stormy day 🚩&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I originally planned to write about WebGPU this week. But I fell into a deep research rabbit hole and honestly… I’m not coming out anytime soon 😅 So that post will probably arrive in a week or two.&lt;br&gt;
Meanwhile, this topic has been on my mind for a while — actually since I wrote &lt;a href="https://dev.to/sylwia-lask/your-github-contribution-graph-means-absolutely-nothing-and-heres-why-2kjc"&gt;Your GitHub Contribution Graph Means Absolutely Nothing (And Here’s Why)&lt;/a&gt;. I kept postponing it, but my main thoughts were slowly evaporating. So I guess its time has finally come 🙂&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I’ve been on many interviews (and I’ve also conducted over a hundred technical interviews myself). I remember most of them as perfectly normal or even positive experiences — even when I didn’t get the job. &lt;/p&gt;

&lt;p&gt;But some of them? Absolutely horror stories.&lt;/p&gt;

&lt;p&gt;This post won’t be an HR guide or a “how to interview” tutorial. These are real stories — mine and my friends’. All of them actually happened. And they show how weird, chaotic, or simply unhealthy recruitment can sometimes get.&lt;/p&gt;

&lt;p&gt;Grab some popcorn 🍿&lt;/p&gt;




&lt;h2&gt;
  
  
  ⏳ The Recruitment That Lasted a Year
&lt;/h2&gt;

&lt;p&gt;This one isn’t about me, but a close friend. I won’t name the company, but think &lt;em&gt;big, famous corporate&lt;/em&gt;. If you’ve ever written &lt;code&gt;export class&lt;/code&gt;, or even just bought a computer, you definitely know them.&lt;/p&gt;

&lt;p&gt;My friend applied and waited a month or two for a response. Then:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HR interview&lt;/li&gt;
&lt;li&gt;weeks later → technical interview&lt;/li&gt;
&lt;li&gt;weeks later → live coding&lt;/li&gt;
&lt;li&gt;weeks later → manager interview&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The manager liked him a lot… but didn’t need him. Another team did, though. So:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;another technical interview&lt;/li&gt;
&lt;li&gt;another live coding session (very similar task)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then silence. For months.&lt;br&gt;
No one from HR could even say what was going on.&lt;/p&gt;

&lt;p&gt;After several more months (!!!), they came back.&lt;/p&gt;

&lt;p&gt;And guess what?&lt;br&gt;
Just one more technical interview, two live coding sessions, and a take-home task… and he’d get an offer 😀&lt;/p&gt;

&lt;p&gt;Yes, for a regular developer role.&lt;br&gt;
With a lower salary than he already had.&lt;/p&gt;

&lt;p&gt;He declined.&lt;/p&gt;

&lt;p&gt;👉 &lt;em&gt;If a company can’t organize its own hiring process, imagine how they organize their projects.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚖️ “How Much Do You Value Work-Life Balance?”
&lt;/h2&gt;

&lt;p&gt;This one is mine. Actually, more than once.&lt;/p&gt;

&lt;p&gt;I once filled out a form for a unicorn startup. One question was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“How much do you value work-life balance? (1–10)”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let’s be honest — I doubt they were looking for people who value it &lt;em&gt;highly&lt;/em&gt; 😅&lt;/p&gt;

&lt;p&gt;To be clear: I do value work-life balance.&lt;br&gt;
Yes, I sometimes code at night, write articles, explore new tech. But I like the freedom to &lt;em&gt;not&lt;/em&gt; do it when I don’t feel like it. To watch a series or read a book (currently polish noblist Olga Tokarczuk ❤️).&lt;/p&gt;

&lt;p&gt;I’m also realistic. Sometimes you push harder near deadlines. Sometimes weekends happen. That’s part of the job.&lt;/p&gt;

&lt;p&gt;But if during recruitment someone digs &lt;em&gt;too deeply&lt;/em&gt; into your overtime tolerance — be careful.&lt;/p&gt;

&lt;p&gt;I once ignored my intuition and joined such a startup.&lt;br&gt;
10–12 hour days. Constant pressure. Endless urgency.&lt;/p&gt;

&lt;p&gt;I lasted a year.&lt;br&gt;
That was the average frontend tenure there.&lt;/p&gt;

&lt;p&gt;I learned a lot, yes. Probably the most of any job.&lt;br&gt;
But you should enter that world consciously — not by accident.&lt;/p&gt;

&lt;p&gt;👉 &lt;em&gt;If a company treats overwork as culture, believe them the first time.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  👀 “Who’s Helping You There?”
&lt;/h2&gt;

&lt;p&gt;A friend of mine was interviewing for an automation tester role.&lt;br&gt;
Combined manager + technical interview.&lt;/p&gt;

&lt;p&gt;Manager part? Great. She was impressed.&lt;/p&gt;

&lt;p&gt;Then came the technical part. The recruiter quizzed her almost like a Python documentation exam.&lt;/p&gt;

&lt;p&gt;She answered well, but then paused for a second, thinking how to phrase a more precise answer. Her gaze drifted slightly to the side while thinking.&lt;/p&gt;

&lt;p&gt;The recruiter interrupted:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“What, is your husband helping you from the side?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;She politely ended the call.&lt;br&gt;
No apology ever followed.&lt;/p&gt;

&lt;p&gt;This story still shocks me. It sounds like a bad joke, but it wasn’t.&lt;/p&gt;

&lt;p&gt;Imagine saying to a male candidate:&lt;br&gt;
“Oh, your wife is helping you?”&lt;/p&gt;

&lt;p&gt;Exactly.&lt;/p&gt;

&lt;p&gt;👉 &lt;em&gt;Disrespect during an interview is a preview of your future workplace.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  😤 Offended Recruiters
&lt;/h2&gt;

&lt;p&gt;Another of my stories.&lt;/p&gt;

&lt;p&gt;Multi-stage recruitment, weeks long. Final stage — a discussion with developers after a technical task.&lt;/p&gt;

&lt;p&gt;There was one tricky security-related part in the task about passing data from host to child. I secured it minimally, knowing it wasn’t perfect.&lt;/p&gt;

&lt;p&gt;They pointed it out. Fair.&lt;/p&gt;

&lt;p&gt;I was genuinely curious how they solved it internally. It was an interesting technical challenge.&lt;/p&gt;

&lt;p&gt;Then they explained.&lt;/p&gt;

&lt;p&gt;And… their solution was extremely vulnerable.&lt;br&gt;
Like “people could potentially use their app for free and leak client data” vulnerable.&lt;/p&gt;

&lt;p&gt;I thought I misunderstood and asked follow-up questions.&lt;br&gt;
Nope.&lt;/p&gt;

&lt;p&gt;They insisted it was “sufficient” and that the data “wasn’t that sensitive” 😅&lt;/p&gt;

&lt;p&gt;To this day I don’t know if they rejected me for questioning it or for my poor TypeScript answers later on. 🙃&lt;/p&gt;

&lt;p&gt;👉 &lt;em&gt;If a company is defensive about flaws instead of curious, that’s a red flag.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🎥 Total Surveillance Mode
&lt;/h2&gt;

&lt;p&gt;Last one 😀&lt;/p&gt;

&lt;p&gt;A friend got a recruitment task on a HackerRank-like platform. Sounds normal, right?&lt;/p&gt;

&lt;p&gt;Except:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;full screen sharing required&lt;/li&gt;
&lt;li&gt;camera on, wide angle&lt;/li&gt;
&lt;li&gt;no documentation allowed&lt;/li&gt;
&lt;li&gt;no external help&lt;/li&gt;
&lt;li&gt;fully recorded session&lt;/li&gt;
&lt;li&gt;strict time limit&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All to ensure the candidate wasn’t cheating.&lt;/p&gt;

&lt;p&gt;For a regular SaaS company.&lt;br&gt;
Not nuclear code. Not Area 51.&lt;/p&gt;

&lt;p&gt;In the era of AI, what does this really test?&lt;br&gt;
Memorized syntax? LeetCode muscle memory?&lt;/p&gt;

&lt;p&gt;👉 &lt;em&gt;If a company assumes you’re a cheater before you even join, trust works both ways.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🤔 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Interviews are a two-way street.&lt;/p&gt;

&lt;p&gt;You’re not just being evaluated — you’re evaluating them too.&lt;/p&gt;

&lt;p&gt;A bad interview process often reflects a messy culture, poor organization, or lack of respect for people’s time.&lt;/p&gt;

&lt;p&gt;Sometimes the best offer…&lt;br&gt;
is the one you decline.&lt;/p&gt;




&lt;p&gt;What about you?&lt;br&gt;
Any recruitment horror stories or red flags you’ve seen? 🚩&lt;/p&gt;

&lt;p&gt;I’m genuinely curious 🙂&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How Seriously Should We Take State of JS and Other Developer Surveys?</title>
      <dc:creator>Sylwia Laskowska</dc:creator>
      <pubDate>Tue, 10 Feb 2026 10:43:07 +0000</pubDate>
      <link>https://dev.to/sylwia-lask/how-seriously-should-we-take-state-of-js-and-other-developer-surveys-9ce</link>
      <guid>https://dev.to/sylwia-lask/how-seriously-should-we-take-state-of-js-and-other-developer-surveys-9ce</guid>
      <description>&lt;p&gt;There was a time when I treated State of JS results almost like prophecy.&lt;/p&gt;

&lt;p&gt;A new edition dropped and I’d read it with excitement, looking for &lt;em&gt;the future of JavaScript&lt;/em&gt; hidden somewhere in those charts.&lt;/p&gt;

&lt;p&gt;Today I still read it.&lt;br&gt;
But with much less awe and much more distance.&lt;/p&gt;

&lt;p&gt;If you haven’t seen the 2025 results yet, you can explore them here:&lt;br&gt;
&lt;a href="https://2025.stateofjs.com/en-US/" rel="noopener noreferrer"&gt;https://2025.stateofjs.com/en-US/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It’s honestly a fantastic piece of work. Beautifully built, interactive, full of data. Huge respect to the creators — it’s not a small project.&lt;/p&gt;

&lt;p&gt;But the real question is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How seriously should we treat it?&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  A Very Short Recap of 2025 📊
&lt;/h2&gt;

&lt;p&gt;I won’t do a full summary. Plenty of people already did, and you can just look at the charts.&lt;/p&gt;

&lt;p&gt;In short:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;TypeScript is firmly mainstream&lt;/li&gt;
&lt;li&gt;Big frameworks mostly hold their positions&lt;/li&gt;
&lt;li&gt;Tooling keeps evolving&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Surveys like this are great for sensing the ecosystem.&lt;br&gt;
What’s popular. What’s growing. What annoys developers.&lt;/p&gt;

&lt;p&gt;Sometimes tools highly praised in surveys reach real production adoption years later. Vite is a good example.&lt;/p&gt;

&lt;p&gt;So yes — these surveys are useful.&lt;/p&gt;

&lt;p&gt;But they come with a lot of nuance.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Younger-Developer Phase 😄
&lt;/h2&gt;

&lt;p&gt;I remember being a junior and wanting to immediately try (or even introduce to production) everything that ranked high in satisfaction.&lt;/p&gt;

&lt;p&gt;Luckily, nobody asked for my opinion back then 😉&lt;/p&gt;

&lt;p&gt;I also used to feel genuinely sad seeing Angular score poorly in satisfaction.&lt;br&gt;
Because… I liked working with it. My teams liked it. Our projects worked.&lt;/p&gt;

&lt;p&gt;Was Angular dying?&lt;/p&gt;

&lt;p&gt;Spoiler: many years later, it’s still doing just fine.&lt;/p&gt;

&lt;p&gt;And it made me wonder:&lt;/p&gt;

&lt;p&gt;If some tools are so loved in surveys, why don’t they dominate job listings?&lt;br&gt;
Why is there constant demand for React and Angular devs, but much less for Vue or Svelte (at least where I live)?&lt;/p&gt;




&lt;h2&gt;
  
  
  A Little Story About Surveys 🧠
&lt;/h2&gt;

&lt;p&gt;Fun fact: when I was very young, I had a part-time job in a company that conducted surveys.&lt;/p&gt;

&lt;p&gt;That’s where I learned how serious research is actually done.&lt;/p&gt;

&lt;p&gt;A reliable study needs:&lt;br&gt;
carefully selected demographics, well-phrased neutral questions, controlled variables, clear definitions, sometimes even different question orders to avoid bias.&lt;/p&gt;

&lt;p&gt;As you can guess — State of JS (and most dev surveys) don’t meet those strict scientific standards.&lt;/p&gt;

&lt;p&gt;And that’s okay. They’re not academic research.&lt;/p&gt;

&lt;p&gt;But it’s worth remembering.&lt;/p&gt;




&lt;h2&gt;
  
  
  Who Actually Answers? 🔥
&lt;/h2&gt;

&lt;p&gt;Most likely:&lt;br&gt;
people who care about tech, follow trends, hang out on DEV, Reddit, Twitter, and enjoy exploring tools.&lt;/p&gt;

&lt;p&gt;Also people willing to spend time filling out a long survey.&lt;/p&gt;

&lt;p&gt;Who probably doesn’t?&lt;br&gt;
Developers who treat programming as a normal job and close their laptop at 5 PM.&lt;/p&gt;

&lt;p&gt;That group might be huge. Possibly the majority.&lt;/p&gt;

&lt;p&gt;So we’re mostly hearing from the curious and passionate slice of the community.&lt;/p&gt;

&lt;p&gt;Which is interesting — but not the whole picture.&lt;/p&gt;




&lt;h2&gt;
  
  
  Regional Reality 🌍
&lt;/h2&gt;

&lt;p&gt;Participation is open, which is great, but it also means representation isn’t proportional.&lt;/p&gt;

&lt;p&gt;The US is strongly represented.&lt;br&gt;
India has one of the biggest developer populations in the world, yet doesn’t always show up proportionally.&lt;/p&gt;

&lt;p&gt;And regions differ.&lt;/p&gt;

&lt;p&gt;Vue is strong in parts of Asia.&lt;br&gt;
In Poland and much of Europe, React and Angular still dominate job markets.&lt;/p&gt;

&lt;p&gt;So survey trends don’t always match local reality.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Does “Usage” Even Mean? 🤨
&lt;/h2&gt;

&lt;p&gt;This one always makes me think.&lt;/p&gt;

&lt;p&gt;If I heard about a tool once by an accident in an office kitchen, do I have awareness?&lt;br&gt;
If I did a tutorial, does that count as usage?&lt;br&gt;
Or should usage mean delivering a real project?&lt;/p&gt;

&lt;p&gt;When someone says they like a tool, is it after comparing many options, or just because it feels nice? Or maybe it's the only tool he/she knows? 🤔&lt;/p&gt;

&lt;p&gt;And even in anonymous surveys, some people may hesitate to admit they don’t know something.&lt;/p&gt;

&lt;p&gt;Human psychology never disappears from data.&lt;/p&gt;




&lt;h2&gt;
  
  
  Surveys vs Real Careers 💼
&lt;/h2&gt;

&lt;p&gt;Can surveys help choose what to learn?&lt;br&gt;
Sometimes.&lt;/p&gt;

&lt;p&gt;Can they guide tech decisions?&lt;br&gt;
Maybe.&lt;/p&gt;

&lt;p&gt;But surveys and job markets are two different worlds.&lt;/p&gt;

&lt;p&gt;You can learn the “best” framework and still land in a 10-year-old legacy codebase.&lt;br&gt;
You can study modern React and get class components on day one 😉&lt;/p&gt;

&lt;p&gt;Real careers are messy and non-linear.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to Read Surveys 🧭
&lt;/h2&gt;

&lt;p&gt;What works for me:&lt;/p&gt;

&lt;p&gt;Look at trends year to year.&lt;br&gt;
Compare satisfaction and usage.&lt;br&gt;
Watch movement, not winners.&lt;br&gt;
Remember that popular tools get more criticism simply because people use them daily.&lt;/p&gt;

&lt;p&gt;And most importantly:&lt;br&gt;
treat surveys as insight, not truth.&lt;/p&gt;

&lt;p&gt;Yesterday’s winner can be tomorrow’s loser.&lt;/p&gt;




&lt;h2&gt;
  
  
  So… Should We Care? 🙂
&lt;/h2&gt;

&lt;p&gt;Yes. But calmly.&lt;/p&gt;

&lt;p&gt;State of JS doesn’t tell you what to use.&lt;br&gt;
It shows what developers are curious about right now.&lt;/p&gt;

&lt;p&gt;Think of it as a compass, not a GPS.&lt;br&gt;
Direction, not destination.&lt;/p&gt;

&lt;p&gt;It reflects the mood of the community more than the future of the industry.&lt;/p&gt;

&lt;p&gt;Still useful. Just not absolute.&lt;/p&gt;




&lt;p&gt;What do you think?&lt;br&gt;
Do surveys influence your decisions, or do you mostly treat them as interesting reading?&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>frontend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Stop Installing Libraries: 10 Browser APIs That Already Solve Your Problems</title>
      <dc:creator>Sylwia Laskowska</dc:creator>
      <pubDate>Wed, 04 Feb 2026 11:05:13 +0000</pubDate>
      <link>https://dev.to/sylwia-lask/stop-installing-libraries-10-browser-apis-that-already-solve-your-problems-35bi</link>
      <guid>https://dev.to/sylwia-lask/stop-installing-libraries-10-browser-apis-that-already-solve-your-problems-35bi</guid>
      <description>&lt;p&gt;The web platform is way more powerful than most developers realize — and every year it quietly gains new superpowers.&lt;/p&gt;




&lt;p&gt;Sometimes choosing a topic is harder than writing the article itself.&lt;/p&gt;

&lt;p&gt;When I thought about what to write this week, only two types of ideas kept comming to mind:&lt;br&gt;
either potential &lt;em&gt;bangers&lt;/em&gt;, or deep technical dives.😅 But I wanted something lighter. Still technical, still useful. But not a 3-day research rabbit hole.&lt;/p&gt;

&lt;p&gt;And since I genuinely love exploring what the browser can do (and how far we can push it), I landed on a sneaky topic: &lt;strong&gt;underused Web APIs&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Some of these might be daily bread for you.&lt;br&gt;
But I’m pretty sure at least a few will make someone go “wait, this exists?!” 😉&lt;/p&gt;

&lt;p&gt;&lt;em&gt;And if you enjoy edge-tech topics and happen to be in Italy this April — come to &lt;a href="//jsday.it"&gt;jsday.it&lt;/a&gt;, where I’ll be speaking about WebGPU + WASM 🙂&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Alright, enough intro. Let’s start.&lt;/p&gt;

&lt;p&gt;Here are 10 browser APIs that deserve way more love.&lt;/p&gt;


&lt;h2&gt;
  
  
  1) Structured Clone API
&lt;/h2&gt;

&lt;p&gt;I have a love–hate relationship with this one.&lt;/p&gt;

&lt;p&gt;For years, one of my favorite interview questions to ask candidates was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“How do you copy an object?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You could learn &lt;em&gt;so much&lt;/em&gt; from the answer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do they understand references?&lt;/li&gt;
&lt;li&gt;Do they know &lt;code&gt;Object.assign&lt;/code&gt;, spread, JSON tricks?&lt;/li&gt;
&lt;li&gt;Do they mention libraries?&lt;/li&gt;
&lt;li&gt;Do they panic? 😄&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;copy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;structuredClone&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;original&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Boom. Perfect deep copy.&lt;/p&gt;

&lt;p&gt;Part of me is happy.&lt;br&gt;
Part of me misses that interview question already.&lt;/p&gt;
&lt;h3&gt;
  
  
  Nice extras
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Works with &lt;code&gt;Map&lt;/code&gt;, &lt;code&gt;Set&lt;/code&gt;, &lt;code&gt;Date&lt;/code&gt;, &lt;code&gt;Blob&lt;/code&gt;, &lt;code&gt;File&lt;/code&gt;, &lt;code&gt;ArrayBuffer&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Handles circular references (no more JSON stringify explosions 💥)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Does NOT clone functions&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Support: Modern browsers (Chrome, Firefox, Safari, Edge). Safe for production.&lt;/em&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  2) Performance API
&lt;/h2&gt;

&lt;p&gt;Very underrated.&lt;/p&gt;

&lt;p&gt;We talk a lot about performance. We install tools. We run Lighthouse. We debate optimizations.&lt;/p&gt;

&lt;p&gt;But sometimes you just want to check:&lt;br&gt;
“Is A actually faster than B, or am I overengineering?”&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;performance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mark&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;start&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// code to measure&lt;/span&gt;

&lt;span class="nx"&gt;performance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mark&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;end&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;performance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;measure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;calc&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;start&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;end&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;performance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getEntriesByName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;calc&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Perfect for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;micro-benchmarks&lt;/li&gt;
&lt;li&gt;checking if a Worker or WASM is worth it&lt;/li&gt;
&lt;li&gt;reality-checking your assumptions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because sometimes the “optimized” version is slower 😅&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Support: Excellent across all modern browsers.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  3) Page Visibility API
&lt;/h2&gt;

&lt;p&gt;Detects whether the tab is active.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;visibilitychange&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hidden&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;video&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pause&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real talk:&lt;br&gt;
Users will open your app, then switch tabs for 20 minutes.&lt;br&gt;
Or 2 hours.&lt;br&gt;
Or forever.&lt;/p&gt;

&lt;p&gt;Use cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;pause videos&lt;/li&gt;
&lt;li&gt;stop polling&lt;/li&gt;
&lt;li&gt;reduce CPU usage&lt;/li&gt;
&lt;li&gt;cleaner analytics&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your backend (and battery life) will thank you.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Support: All modern browsers.&lt;/em&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  4) ResizeObserver
&lt;/h2&gt;

&lt;p&gt;Finally — observing &lt;strong&gt;element size&lt;/strong&gt;, not just window size.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ro&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ResizeObserver&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;entries&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;entry&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;contentRect&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;ro&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;observe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;element&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you ever built responsive components, charts, or dashboards, you probably wrote some cursed resize logic in the past.&lt;/p&gt;

&lt;p&gt;This API feels like the browser saying:&lt;br&gt;
“Relax, I got you now.”&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Support: Modern browsers, widely available.&lt;/em&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  5) IntersectionObserver
&lt;/h2&gt;

&lt;p&gt;The sibling of ResizeObserver.&lt;/p&gt;

&lt;p&gt;Checks if an element is in the viewport.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;io&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;IntersectionObserver&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;entries&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;entry&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isIntersecting&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Visible!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;io&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;observe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;element&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Amazing for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;infinite scroll&lt;/li&gt;
&lt;li&gt;lazy loading&lt;/li&gt;
&lt;li&gt;scroll animations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Anyone who implemented infinite scroll manually once…&lt;br&gt;
never wants to do it again 😄&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Support: All modern browsers.&lt;/em&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  6) AbortController
&lt;/h2&gt;

&lt;p&gt;Many devs know it for fetch…&lt;/p&gt;

&lt;p&gt;But it can cancel &lt;strong&gt;more than just fetch&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;controller&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;AbortController&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;controller&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;signal&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// later&lt;/span&gt;
&lt;span class="nx"&gt;controller&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abort&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also use it for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;event listeners&lt;/li&gt;
&lt;li&gt;streams&lt;/li&gt;
&lt;li&gt;any abortable API&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even better:&lt;br&gt;
👉 One signal can cancel multiple operations.&lt;/p&gt;

&lt;p&gt;Clean, scalable, and very “grown-up codebase” friendly.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Support: All modern browsers.&lt;/em&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  7) Idle Detection API
&lt;/h2&gt;

&lt;p&gt;Page Visibility tells you if the tab is active.&lt;br&gt;
Idle Detection tells you if the &lt;strong&gt;human is active&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;detector&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;IdleDetector&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;detector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nx"&gt;detector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;change&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;detector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;userState&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Meaning:&lt;br&gt;
User might have your app open…&lt;br&gt;
but is actually making coffee ☕ or in a meeting.&lt;/p&gt;

&lt;p&gt;Use cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;auto-logout&lt;/li&gt;
&lt;li&gt;“away” status&lt;/li&gt;
&lt;li&gt;background optimizations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Yes, you can detect if the user left the computer.&lt;br&gt;
A bit creepy. Very useful 😄&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Support: Mostly Chromium-based. Requires permission.&lt;/em&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  8) BroadcastChannel API
&lt;/h2&gt;

&lt;p&gt;Easy multi-tab communication.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;channel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;BroadcastChannel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;app&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;postMessage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;logout&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onmessage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;logout sync&lt;/li&gt;
&lt;li&gt;auth state&lt;/li&gt;
&lt;li&gt;shared session logic&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Surprisingly practical in real apps where users open 5 tabs “just in case.”&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Support: Modern browsers. Safari joined later but supports it.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  9) Web Locks API
&lt;/h2&gt;

&lt;p&gt;The cousin of BroadcastChannel.&lt;/p&gt;

&lt;p&gt;Prevents duplicate work across tabs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;locks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;data-lock&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nx"&gt;lock&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetchData&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;only one tab fetches notifications&lt;/li&gt;
&lt;li&gt;avoids backend spam&lt;/li&gt;
&lt;li&gt;coordinates shared resources&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Feels very “distributed systems meets frontend.”&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Support: Mostly Chromium. Not universal.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  10) File System Access API
&lt;/h2&gt;

&lt;p&gt;Yes — real filesystem access from the browser.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;fileHandle&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;showOpenFilePicker&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;fileHandle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getFile&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;web editors&lt;/li&gt;
&lt;li&gt;import/export tools&lt;/li&gt;
&lt;li&gt;power-user apps&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first time you use it, it feels slightly illegal.&lt;br&gt;
Like “are we really allowed to do this on the web?” 😄&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Support: Chromium-heavy. Limited elsewhere.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Reality Check 🧠
&lt;/h2&gt;

&lt;p&gt;Many of these APIs are well supported in modern browsers.&lt;br&gt;
But some (Idle Detection, File System Access, Web Locks) are still Chromium-centric.&lt;/p&gt;

&lt;p&gt;So always check compatibility before going all-in.&lt;/p&gt;

&lt;p&gt;But simply knowing these exist?&lt;br&gt;
That already gives you an edge.&lt;/p&gt;

&lt;p&gt;The web platform evolves fast.&lt;br&gt;
Sometimes the “new tech” isn’t a framework — it’s a native browser feature that’s been sitting there quietly.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What’s your favorite underrated Web API that nobody talks about?&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>frontend</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Is Learning CSS a Waste of Time in 2026?</title>
      <dc:creator>Sylwia Laskowska</dc:creator>
      <pubDate>Thu, 29 Jan 2026 11:07:18 +0000</pubDate>
      <link>https://dev.to/sylwia-lask/is-learning-css-a-waste-of-time-in-2026-nj3</link>
      <guid>https://dev.to/sylwia-lask/is-learning-css-a-waste-of-time-in-2026-nj3</guid>
      <description>&lt;p&gt;With modern frameworks, component libraries, and utility-first CSS, it’s a fair question.&lt;/p&gt;

&lt;p&gt;Most frontend developers today rarely write “real” CSS. Layouts come prebuilt. Responsiveness is handled for us. Accessibility is supposed to be baked in. If something needs styling, we tweak a variable, add a utility class, or override a component token.&lt;/p&gt;

&lt;p&gt;So… why spend time learning CSS at all?&lt;/p&gt;

&lt;p&gt;For a long time, I thought the same.&lt;br&gt;
Until accessibility forced me back into it.&lt;/p&gt;




&lt;p&gt;Recently, I had a task that sounded quite innocent:&lt;br&gt;
take an old component and bring it up to modern &lt;strong&gt;WCAG accessibility standards&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You know — better accessibility, higher contrast, proper focus states.&lt;br&gt;
Not a &lt;em&gt;nice-to-have&lt;/em&gt;. A hard requirement, because I treat accessibility very serious.&lt;/p&gt;

&lt;p&gt;In practice, it meant &lt;strong&gt;a lot of CSS work&lt;/strong&gt;.&lt;br&gt;
The container had to be heavily reworked, but the visual design had to stay exactly the same.&lt;/p&gt;

&lt;p&gt;And wow… I struggled. A lot. 😅&lt;/p&gt;

&lt;p&gt;At some point I caught myself thinking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;CSS might actually be the hardest part of frontend development.&lt;br&gt;
More complicated than JavaScript.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;(Okay, maybe it didn’t help that the previous developer clearly didn’t understand CSS either 😬)&lt;/p&gt;




&lt;h2&gt;
  
  
  CSS Used to Be My Thing
&lt;/h2&gt;

&lt;p&gt;What makes this funny is that I &lt;em&gt;used to be really good at CSS&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Box model? Easy.&lt;br&gt;
Layout tricks? Daily bread.&lt;br&gt;
I could even center an element both vertically and horizontally — &lt;em&gt;without Googling&lt;/em&gt; 😄&lt;/p&gt;

&lt;p&gt;A long time ago, I even made some extra money building WordPress websites.&lt;br&gt;
Technically simple stuff, but clients paid me because the pages &lt;strong&gt;looked good&lt;/strong&gt;. That was the value.&lt;/p&gt;

&lt;p&gt;So… what happened?&lt;/p&gt;




&lt;h2&gt;
  
  
  The Accessibility Wake-Up Call ♿
&lt;/h2&gt;

&lt;p&gt;This recent task was a harsh reminder.&lt;/p&gt;

&lt;p&gt;The real problems weren’t colors or fonts — they were things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;focus outlines breaking the layout&lt;/li&gt;
&lt;li&gt;keyboard navigation suddenly revealing broken DOM order&lt;/li&gt;
&lt;li&gt;outlines appearing on only &lt;em&gt;half&lt;/em&gt; of a component&lt;/li&gt;
&lt;li&gt;positioning hacks collapsing once &lt;code&gt;:focus-visible&lt;/code&gt; came into play&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fixing keyboard navigation alone exposed how fragile the layout really was.&lt;/p&gt;

&lt;p&gt;Nothing “advanced”.&lt;br&gt;
Just &lt;strong&gt;CSS fundamentals meeting real-world constraints&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And that’s when it hit me:&lt;br&gt;
I’ve been out of serious CSS practice for a long time.&lt;/p&gt;




&lt;h2&gt;
  
  
  CSS Slowly Slipped Into the Background
&lt;/h2&gt;

&lt;p&gt;I don’t know if you feel the same, but for years now CSS has been… secondary.&lt;/p&gt;

&lt;p&gt;In most projects we use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a component library&lt;/li&gt;
&lt;li&gt;a design system&lt;/li&gt;
&lt;li&gt;a framework that already handles layout and responsiveness&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Our “CSS work” usually means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;styling a single component&lt;/li&gt;
&lt;li&gt;tweaking a few variables&lt;/li&gt;
&lt;li&gt;overriding something that &lt;em&gt;almost&lt;/em&gt; fits&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Mobile view? Out of the box.&lt;br&gt;
Grid? Already solved.&lt;br&gt;
Spacing? Tokens.&lt;/p&gt;

&lt;p&gt;And then there’s Tailwind.&lt;/p&gt;

&lt;p&gt;Don’t get me wrong — I use it too. A lot.&lt;br&gt;
It makes things fast and predictable. Combined with shadcn/ui, you can ship decent-looking UIs without really &lt;em&gt;designing&lt;/em&gt; anything.&lt;/p&gt;

&lt;p&gt;Honestly, for hobby projects or demos, I don’t even try anymore.&lt;br&gt;
I just ask an LLM to generate a nice layout — Tailwind included — and move on.&lt;/p&gt;

&lt;p&gt;Zero CSS struggle. Zero pain.&lt;/p&gt;

&lt;p&gt;Sure, sometimes something breaks.&lt;br&gt;
A &lt;code&gt;z-index&lt;/code&gt; here, a weird overflow there.&lt;br&gt;
But that’s nothing compared to designing and maintaining entire layouts by hand.&lt;/p&gt;

&lt;p&gt;I often don’t even install Stylelint anymore — even though I once contributed a few lines to it, which probably makes me like it even more.&lt;br&gt;
Why bother, if the whole component has five lines of CSS?&lt;/p&gt;




&lt;h2&gt;
  
  
  Meanwhile… CSS Is Actually Thriving ✨
&lt;/h2&gt;

&lt;p&gt;And that’s the irony.&lt;/p&gt;

&lt;p&gt;CSS has evolved &lt;em&gt;massively&lt;/em&gt; in recent years.&lt;/p&gt;

&lt;p&gt;We now have things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CSS variables&lt;/strong&gt; (okay, not brand new — but still fundamental)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Container queries&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;:has()&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cascade layers&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Native nesting&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Modern color spaces&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scroll-driven animations&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CSS today is more powerful than it has ever been.&lt;/p&gt;

&lt;p&gt;Do I follow all of this closely?&lt;br&gt;
Kind of. But not deeply.&lt;/p&gt;

&lt;p&gt;Because in day-to-day work, I rarely &lt;em&gt;need&lt;/em&gt; it.&lt;br&gt;
The framework handles it. The library abstracts it. The system hides it.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Generational Gap
&lt;/h2&gt;

&lt;p&gt;What’s interesting is that when I look at younger developers, I still feel like &lt;em&gt;the old guard&lt;/em&gt; understands CSS better.&lt;/p&gt;

&lt;p&gt;I’m not even sure CSS is properly taught anymore.&lt;br&gt;
University? Probably not.&lt;br&gt;
Bootcamps? Two days of CSS, then straight to JavaScript or “fullstack”.&lt;/p&gt;

&lt;p&gt;(By the way — do bootcamps still exist? 😅)&lt;/p&gt;

&lt;p&gt;Is that the right direction?&lt;br&gt;
Or just a natural evolution?&lt;/p&gt;




&lt;h2&gt;
  
  
  Handmade Pasta and CSS
&lt;/h2&gt;

&lt;p&gt;Sometimes I wonder if my nostalgia for CSS is like grandmothers making pasta from scratch.&lt;/p&gt;

&lt;p&gt;Sure — it’s better.&lt;br&gt;
Sure — it’s more satisfying.&lt;/p&gt;

&lt;p&gt;But how often do we actually have time for that?&lt;/p&gt;

&lt;p&gt;Frameworks, utilities, and abstractions exist for a reason.&lt;br&gt;
They make us faster. They reduce mistakes. They standardize work.&lt;/p&gt;

&lt;p&gt;But accessibility doesn’t care about abstractions.&lt;/p&gt;

&lt;p&gt;To be fair, most modern frameworks and component libraries do provide accessibility out of the box — sensible ARIA attributes, keyboard support, focus management.&lt;/p&gt;

&lt;p&gt;But that accessibility is often limited to the “happy path”. The moment you need custom layouts, visual tweaks, or non-standard interactions, you’re back to raw CSS — and whatever knowledge you still have.&lt;/p&gt;

&lt;p&gt;And when something breaks — focus, keyboard navigation, layout flow —&lt;br&gt;
there’s no Tailwind class or component prop that saves you.&lt;/p&gt;

&lt;p&gt;Only CSS knowledge does.&lt;/p&gt;




&lt;h2&gt;
  
  
  So… Did CSS Get Worse?
&lt;/h2&gt;

&lt;p&gt;I don’t think so.&lt;/p&gt;

&lt;p&gt;I think &lt;strong&gt;we just stopped learning it&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And accessibility has a brutal way of exposing that.&lt;/p&gt;




&lt;h2&gt;
  
  
  What About You?
&lt;/h2&gt;

&lt;p&gt;Do you still work with CSS on a regular basis?&lt;br&gt;
Do you ever design layouts from scratch anymore?&lt;/p&gt;

&lt;p&gt;Or maybe CSS is becoming a kind of &lt;em&gt;dark knowledge&lt;/em&gt; —&lt;br&gt;
something you only rediscover when things go wrong?&lt;/p&gt;

&lt;p&gt;Maybe it’s worth exercising those muscles once in a while —&lt;br&gt;
even just for fun.&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>frontend</category>
      <category>a11y</category>
    </item>
    <item>
      <title>Why NaN !== NaN Makes Perfect Sense (I Promise)</title>
      <dc:creator>Sylwia Laskowska</dc:creator>
      <pubDate>Sun, 25 Jan 2026 15:11:47 +0000</pubDate>
      <link>https://dev.to/sylwia-lask/why-nan-nan-makes-perfect-sense-i-promise-2lke</link>
      <guid>https://dev.to/sylwia-lask/why-nan-nan-makes-perfect-sense-i-promise-2lke</guid>
      <description>&lt;h2&gt;
  
  
  No, JavaScript Isn’t Broken (Again)
&lt;/h2&gt;

&lt;p&gt;I’ll admit it — sometimes I like publishing a post on the weekend, when both the internet &lt;em&gt;and&lt;/em&gt; real life slow down a bit. But weekends are not the time for heavy technical or philosophical deep dives. It’s better to go for something lighter.&lt;/p&gt;

&lt;p&gt;I spent a while looking for the right format. Topics like &lt;em&gt;“the funniest commits ever”&lt;/em&gt; are fun, sure — but how many times can you do that?&lt;/p&gt;

&lt;p&gt;And then it clicked.&lt;br&gt;
This format — let’s call it &lt;strong&gt;JS WTF&lt;/strong&gt; — fits my weekend vibe perfectly 😄&lt;/p&gt;

&lt;p&gt;The first part,&lt;br&gt;
&lt;a href="https://dev.to/sylwia-lask/yes-true-true-2-and-no-javascript-isnt-broken-37p7"&gt;&lt;strong&gt;Yes, true + true === 2. No, JavaScript isn't broken&lt;/strong&gt;&lt;/a&gt;,&lt;br&gt;
got quite a bit of attention.&lt;/p&gt;

&lt;p&gt;And let me tell you something else — the comments under that article were absolute gold ✨&lt;br&gt;
I love all of your comments. But the nerdy discussions? Pure treasure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;“I agree with you 99.9%, but this part needs clarification”&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;“This isn’t really computer science — that term is slightly off”&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;“You’re right, but I think JS should’ve solved this problem differently”&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My heart grew three sizes that day. Please, more of this 💙&lt;/p&gt;

&lt;p&gt;After that article and all the discussions, the next natural candidate for the series is a classic JS WTF:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NaN !== NaN&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As weird as it looks, this behavior is actually &lt;strong&gt;fully logical&lt;/strong&gt; — and I hope that after reading this article, it won’t feel strange to anyone anymore.&lt;/p&gt;

&lt;p&gt;As before: if you enjoy this series, smash that like button 😄😄😄&lt;br&gt;
Alright — let’s get to the point.&lt;/p&gt;


&lt;h2&gt;
  
  
  So… what &lt;em&gt;is&lt;/em&gt; NaN anyway?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;NaN&lt;/code&gt; stands for &lt;strong&gt;Not a Number&lt;/strong&gt;.&lt;br&gt;
In JavaScript, it’s a special numeric value of type &lt;code&gt;number&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="c1"&gt;// "number"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You usually get &lt;code&gt;NaN&lt;/code&gt; as the result of an invalid numeric operation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;         &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sqrt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="nc"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;💩&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So far, so good.&lt;/p&gt;

&lt;p&gt;Now comes the fun part 👀&lt;/p&gt;




&lt;h2&gt;
  
  
  Why is &lt;code&gt;NaN !== NaN&lt;/code&gt;?
&lt;/h2&gt;

&lt;p&gt;Let’s start with the surprise:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At first glance, this feels completely insane.&lt;br&gt;
I mean… if something is &lt;em&gt;not a number&lt;/em&gt;, shouldn’t it be equal to… itself?&lt;/p&gt;

&lt;p&gt;But here’s the key idea:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NaN does not represent a specific value.&lt;/strong&gt;&lt;br&gt;
It represents an &lt;em&gt;unknown&lt;/em&gt; or &lt;em&gt;invalid&lt;/em&gt; result.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Think of &lt;code&gt;NaN&lt;/code&gt; as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“I tried to compute something, but the result is undefined.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If two computations both fail, JavaScript has &lt;strong&gt;no way to prove&lt;/strong&gt; that they failed &lt;em&gt;in the same way&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;This behavior is not a JavaScript quirk.&lt;br&gt;
It comes straight from the &lt;strong&gt;IEEE-754 floating-point standard&lt;/strong&gt;, which many languages follow.&lt;/p&gt;

&lt;p&gt;The IEEE-754 actually allows &lt;strong&gt;multiple NaN representations&lt;/strong&gt; internally. JavaScript does not expose those details, so from the language’s point of view, all NaN results are simply &lt;em&gt;unknown&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;So instead of pretending they’re equal, the language says:&lt;br&gt;
👉 &lt;em&gt;“I don’t know — so I won’t say they are.”&lt;/em&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  A useful mental model 🧠
&lt;/h2&gt;

&lt;p&gt;Imagine this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sqrt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;b&lt;/code&gt; are &lt;code&gt;NaN&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;But are they the &lt;em&gt;same&lt;/em&gt; NaN?&lt;br&gt;
According to the spec: &lt;strong&gt;you cannot know&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Because of that, &lt;strong&gt;all equality comparisons involving NaN return false&lt;/strong&gt; — even when comparing it to itself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This rule also applies to relational comparisons:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;   &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;   &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;  &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;  &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once &lt;code&gt;NaN&lt;/code&gt; appears, comparisons stop making sense — and JavaScript refuses to lie about it.&lt;/p&gt;




&lt;h2&gt;
  
  
  “Okay, but how do I check for NaN then?”
&lt;/h2&gt;

&lt;p&gt;Excellent question 😄&lt;br&gt;
And yes — JavaScript gives you tools.&lt;/p&gt;
&lt;h3&gt;
  
  
  ❌ Don’t do this
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="c1"&gt;// always false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  ✅ Do this instead
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is the &lt;strong&gt;correct and safe&lt;/strong&gt; way.&lt;/p&gt;

&lt;p&gt;There’s also the global &lt;code&gt;isNaN()&lt;/code&gt;, but it performs implicit type coercion and can lead to surprises:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;123&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;span class="nf"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;💩&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="c1"&gt;// true&lt;/span&gt;

&lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;💩&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In most real-world cases, &lt;code&gt;Number.isNaN()&lt;/code&gt; is exactly what you want.&lt;/p&gt;




&lt;h2&gt;
  
  
  A small plot twist 👀
&lt;/h2&gt;

&lt;p&gt;JavaScript &lt;em&gt;does&lt;/em&gt; give you one way to say that NaN equals NaN:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;NaN&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;NaN&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Object.is()&lt;/code&gt; is a more precise comparison algorithm that treats special numeric edge cases differently.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;         &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes &lt;code&gt;Object.is()&lt;/code&gt; extremely useful in low-level or numeric-heavy code.&lt;/p&gt;




&lt;h2&gt;
  
  
  Is JavaScript the only weird one?
&lt;/h2&gt;

&lt;p&gt;Short answer: &lt;strong&gt;nope&lt;/strong&gt; 😌&lt;br&gt;
This behavior exists in many popular languages that follow IEEE-754.&lt;/p&gt;

&lt;h3&gt;
  
  
  ☕ Java
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;Double&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nc"&gt;Double&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;NaN&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Java even documents this explicitly.&lt;/p&gt;




&lt;h3&gt;
  
  
  🐍 Python
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;nan&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nf"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;nan&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# False
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same idea, same rule.&lt;/p&gt;




&lt;h3&gt;
  
  
  🦀 Rust
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;f64&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;NAN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rust stays very close to the floating-point standard here.&lt;/p&gt;




&lt;h3&gt;
  
  
  🧠 C / C++
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="n"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;NaN&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Classic behavior — nothing special.&lt;/p&gt;




&lt;h3&gt;
  
  
  🟢 So who behaves differently?
&lt;/h3&gt;

&lt;p&gt;In environments that avoid IEEE-754 floating-point numbers altogether — for example, integer-only domains or exact decimal/rational numeric types — you may never encounter NaN.&lt;/p&gt;

&lt;p&gt;But for mainstream, numeric-heavy languages, this behavior is the norm.&lt;/p&gt;

&lt;p&gt;JavaScript is not broken.&lt;br&gt;
It’s just being honest 😄&lt;/p&gt;




&lt;h2&gt;
  
  
  Why this actually makes sense
&lt;/h2&gt;

&lt;p&gt;The alternative would be worse.&lt;/p&gt;

&lt;p&gt;If &lt;code&gt;NaN === NaN&lt;/code&gt; were &lt;code&gt;true&lt;/code&gt;, invalid results could quietly behave like meaningful values and slip through equality checks.&lt;/p&gt;

&lt;p&gt;By making all &lt;code&gt;NaN&lt;/code&gt; comparisons return false, languages prevent invalid computations from masquerading as valid ones.&lt;/p&gt;

&lt;p&gt;And bugs that &lt;em&gt;fail loudly&lt;/em&gt; are much easier to debug than bugs that pretend everything is fine.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;NaN !== NaN&lt;/code&gt; looks like a joke at first glance.&lt;br&gt;
But once you understand that &lt;code&gt;NaN&lt;/code&gt; means &lt;em&gt;“unknown result”&lt;/em&gt;, everything clicks.&lt;/p&gt;

&lt;p&gt;It’s not a JavaScript WTF.&lt;br&gt;
It’s a &lt;strong&gt;floating-point reality check&lt;/strong&gt; 😉&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Why WebGPU Feels Like the Future of the Web (Live Demo 🚀)</title>
      <dc:creator>Sylwia Laskowska</dc:creator>
      <pubDate>Wed, 21 Jan 2026 12:54:52 +0000</pubDate>
      <link>https://dev.to/sylwia-lask/why-webgpu-feels-like-the-future-of-the-web-live-demo--2bjh</link>
      <guid>https://dev.to/sylwia-lask/why-webgpu-feels-like-the-future-of-the-web-live-demo--2bjh</guid>
      <description>&lt;p&gt;WebGPU is &lt;em&gt;the&lt;/em&gt; hot topic right now. A brand-new web API that will most likely replace WebGL sooner rather than later (I won't miss you, bro 👋).&lt;/p&gt;

&lt;p&gt;It’s already supported by all major browsers, and honestly… how could I &lt;em&gt;not&lt;/em&gt; try it?&lt;/p&gt;

&lt;p&gt;So I did what any curious frontend-centric software dev would do: I built a small interactive demo and learned a lot more than I initially expected.&lt;/p&gt;




&lt;h2&gt;
  
  
  First things first: why GPUs?
&lt;/h2&gt;

&lt;p&gt;For many of you this might sound obvious, but let’s do a quick intro for anyone new to this area.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CPUs&lt;/strong&gt; are great at doing a few complex things one after another.&lt;br&gt;
&lt;strong&gt;GPUs&lt;/strong&gt; are great at doing &lt;em&gt;simple things, massively in parallel&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;That’s why GPUs shine in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;graphics and image processing&lt;/li&gt;
&lt;li&gt;simulations&lt;/li&gt;
&lt;li&gt;matrix-heavy workloads&lt;/li&gt;
&lt;li&gt;and yes — things like &lt;strong&gt;LLMs&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whether you’re rendering pixels, blurring textures, or multiplying huge matrices, GPUs are simply built for this kind of work. WebGPU finally gives us proper access to that power directly in the browser.&lt;/p&gt;




&lt;h2&gt;
  
  
  So… how is this different from WebGL?
&lt;/h2&gt;

&lt;p&gt;WebGL is based on &lt;strong&gt;OpenGL&lt;/strong&gt;, which is… well… old. Very old in GPU years.&lt;/p&gt;

&lt;p&gt;With WebGL:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;there were no real compute shaders&lt;/li&gt;
&lt;li&gt;everything had to be expressed as a “rendering problem”&lt;/li&gt;
&lt;li&gt;lots of hacks, tricks, and workarounds&lt;/li&gt;
&lt;li&gt;a lot of hidden global state&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you ever implemented GPGPU in WebGL, you probably remember encoding data in textures and pretending triangles were something else entirely 🙃&lt;/p&gt;

&lt;p&gt;WebGPU fixes this properly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;explicit compute passes&lt;/li&gt;
&lt;li&gt;explicit pipelines and bind groups&lt;/li&gt;
&lt;li&gt;no magical global state&lt;/li&gt;
&lt;li&gt;APIs that map directly to modern GPU architectures (Metal, Vulkan, DirectX 12)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In short: &lt;strong&gt;WebGPU is how GPUs actually work today&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Is WebGPU production-ready?
&lt;/h2&gt;

&lt;p&gt;The honest answer: &lt;strong&gt;it depends&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;require modern browsers&lt;/li&gt;
&lt;li&gt;target up-to-date Chrome, Edge, Firefox, Safari&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;→ then yes, WebGPU is absolutely usable today.&lt;/p&gt;

&lt;p&gt;If, however:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you have a very broad audience&lt;/li&gt;
&lt;li&gt;someone out there is still using an ancient Safari&lt;/li&gt;
&lt;li&gt;or (please no) IE 11&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;→ then you either invest in a WebGL fallback, or you skip WebGPU for now.&lt;/p&gt;

&lt;p&gt;For experiments, demos, internal tools, and forward-looking products?&lt;br&gt;
It’s already a very solid choice.&lt;/p&gt;




&lt;h2&gt;
  
  
  WGSL – those “weird” new shader files
&lt;/h2&gt;

&lt;p&gt;WebGPU introduces &lt;strong&gt;WGSL (WebGPU Shading Language)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;At first glance, it looks strange — but if you’ve ever seen shaders for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Metal&lt;/li&gt;
&lt;li&gt;Vulkan&lt;/li&gt;
&lt;li&gt;or modern DirectX&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;…it actually feels quite familiar.&lt;/p&gt;

&lt;p&gt;WGSL is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;strongly typed&lt;/li&gt;
&lt;li&gt;explicit&lt;/li&gt;
&lt;li&gt;designed to avoid a whole class of GPU bugs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this project I keep shaders in separate &lt;code&gt;.wgsl&lt;/code&gt; files, but you &lt;em&gt;can&lt;/em&gt; also inline them as strings in TypeScript if you want. VS Code already has syntax highlighting for WGSL in both cases, which helps a lot.&lt;/p&gt;




&lt;h2&gt;
  
  
  Now, about my demo
&lt;/h2&gt;

&lt;p&gt;I won’t lie — this demo was &lt;strong&gt;harder to write than many of my other experiments&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Maybe it’s because WebGPU is still relatively fresh.&lt;br&gt;
Or maybe it’s because I’ve never been particularly passionate about computer graphics… and this demo is &lt;em&gt;very&lt;/em&gt; graphics-heavy.&lt;/p&gt;

&lt;p&gt;But in the end? I’m really happy with the result.&lt;/p&gt;

&lt;p&gt;Visually, it looks like glowing ink or smoke that appears when you move your cursor across the canvas.&lt;br&gt;
Technically, it’s a GPU-driven simulation where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;pointer input injects color into a floating-point texture&lt;/li&gt;
&lt;li&gt;compute shaders blur and transport that data over time&lt;/li&gt;
&lt;li&gt;values slowly fade out, creating trails&lt;/li&gt;
&lt;li&gt;a render pass displays the result&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Is it physically accurate? Absolutely not 😄&lt;br&gt;
Does it look cool? Oh yes.&lt;/p&gt;

&lt;p&gt;Live parameters like trail length, brush size, swirl strength, and color can all be tweaked via a control panel — no shader recompilation needed.&lt;/p&gt;




&lt;h2&gt;
  
  
  React… for a WebGPU demo?
&lt;/h2&gt;

&lt;p&gt;Most WebGPU demos you’ll find are written in plain HTML + JS. I could’ve done that too.&lt;/p&gt;

&lt;p&gt;But I decided to use &lt;strong&gt;React + TypeScript&lt;/strong&gt; as a thin wrapper:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;clean UI&lt;/li&gt;
&lt;li&gt;easy state management for sliders&lt;/li&gt;
&lt;li&gt;zero manual DOM wiring&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It worked great — with one important caveat.&lt;/p&gt;

&lt;p&gt;To make this demo usable, I had to &lt;strong&gt;disable React Strict Mode&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Why? Because Strict Mode intentionally runs effects twice in development to detect side effects. That’s normally fantastic… but not when you’re creating GPU devices, pipelines, textures, and buffers. Double initialization can break things very quickly.&lt;/p&gt;

&lt;p&gt;Low-level GPU code is one of those rare cases where Strict Mode gets in the way.&lt;/p&gt;




&lt;h2&gt;
  
  
  A TypeScript gotcha
&lt;/h2&gt;

&lt;p&gt;One more small thing:&lt;br&gt;
TypeScript doesn’t ship WebGPU types fully enabled out of the box yet.&lt;/p&gt;

&lt;p&gt;You need to explicitly enable WebGPU typings in your TS config, otherwise none of the GPU types will exist. It’s a one-time setup, but worth mentioning if you’re trying this for the first time.&lt;/p&gt;




&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/sylwia-lask/webgpu-neon-demo" rel="noopener noreferrer"&gt;https://github.com/sylwia-lask/webgpu-neon-demo&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Live demo:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://sylwia-lask.github.io/webgpu-neon-demo/" rel="noopener noreferrer"&gt;https://sylwia-lask.github.io/webgpu-neon-demo/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;WebGPU feels like a &lt;em&gt;real&lt;/em&gt; step forward for the web.&lt;br&gt;
Not just “slightly better graphics”, but an entirely new class of things we can realistically build in the browser.&lt;/p&gt;

&lt;p&gt;This demo is just a visual experiment — but it already shows how powerful, expressive, and fun GPU-driven web apps can be.&lt;/p&gt;

&lt;p&gt;If you’ve been curious about WebGPU… this is your sign to try it 🚀&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webgpu</category>
      <category>webdev</category>
      <category>react</category>
    </item>
    <item>
      <title>Your GitHub Contribution Graph Means Absolutely Nothing - And Here’s Why</title>
      <dc:creator>Sylwia Laskowska</dc:creator>
      <pubDate>Tue, 13 Jan 2026 11:42:28 +0000</pubDate>
      <link>https://dev.to/sylwia-lask/your-github-contribution-graph-means-absolutely-nothing-and-heres-why-2kjc</link>
      <guid>https://dev.to/sylwia-lask/your-github-contribution-graph-means-absolutely-nothing-and-heres-why-2kjc</guid>
      <description>&lt;p&gt;If your GitHub contribution graph disappeared tomorrow, would that make you a worse developer?&lt;/p&gt;

&lt;p&gt;For years, we’ve been trained — consciously or not — to treat green squares as a proxy for competence, discipline, or even passion.&lt;/p&gt;

&lt;p&gt;TL;DR:&lt;br&gt;
&lt;em&gt;A GitHub contribution graph measures neither productivity, nor skill, nor engagement as a developer.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Let me start with two very short stories that inspired me to write this article.&lt;/p&gt;

&lt;h2&gt;
  
  
  Story #1: Auto-commits and visible consistency 🤖
&lt;/h2&gt;

&lt;p&gt;This discussion was inspired by an &lt;a href="https://dev.to/trojanmocx/i-built-a-desktop-app-that-commits-to-github-so-i-dont-have-to-lie-about-consistency-3jd5"&gt;article&lt;/a&gt; I recently read on DEV.&lt;/p&gt;

&lt;p&gt;The author described how he created an app that automatically commits his code. According to him, he programs a lot, but often simply forgets to commit and push his changes — which makes his GitHub contribution graph look… poor.&lt;/p&gt;

&lt;p&gt;And while I absolutely respect the curiosity, creativity, and the act of turning an idea into a working project, one thought immediately crossed my mind:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who on earth evaluates developers based on the number of their commits?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That makes very little sense.&lt;/p&gt;

&lt;p&gt;Many people in the comments agreed, but some shared stories from job interviews where managers actually asked candidates why their GitHub activity was so low. Even if the answer made perfect sense (for example: most of their work lives in private company repositories) and the interview continued normally, there was still that unpleasant feeling — the candidate was pushed into a defensive position for no good reason.&lt;/p&gt;

&lt;p&gt;Personally, I’ve participated in many recruitment processes and was asked about my GitHub exactly once. But maybe I’m just lucky?&lt;/p&gt;

&lt;h2&gt;
  
  
  Story #2: The graph of doom 😱
&lt;/h2&gt;

&lt;p&gt;A few days earlier, a friend from my previous job shared a screenshot of someone’s contribution graph. I’ve modified it here to protect privacy, but it looked roughly like this (The AI stubbornly paints 8 days a week instead of 7 — let's keep it that way 🙃):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiz41jmks57xhf982sqgf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiz41jmks57xhf982sqgf.png" alt="GitHub contribution graph totally full - all year in green, including weekends" width="800" height="317"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Impressive? Maybe. Terrifying? Also maybe.&lt;/p&gt;

&lt;p&gt;My friend — a very empathetic person — didn’t feel admiration at all. Instead, he felt concern.&lt;/p&gt;

&lt;p&gt;Where is the work-life balance?&lt;br&gt;
When does this person rest?&lt;br&gt;
&lt;em&gt;How does this human being even function?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The mystery was solved pretty quickly. The graph most likely looked like this because the user had a job that ran a &lt;strong&gt;daily database backup&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For the record: this person actually &lt;em&gt;was&lt;/em&gt; very active on GitHub and contributed to many open-source projects — just… not &lt;em&gt;that&lt;/em&gt; much.&lt;/p&gt;

&lt;p&gt;And this is where we get to the core of the problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  When did a contribution graph become a way to judge someone as a developer? 🤔
&lt;/h2&gt;

&lt;p&gt;By design, it never should have been.&lt;br&gt;
And it doesn’t hold up to even basic common sense.&lt;/p&gt;

&lt;p&gt;And yet, somehow, we still look at it and think:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Oh, this person works a lot.”&lt;/li&gt;
&lt;li&gt;“This dev commits once in a while — probably not very engaged.”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s one thing when random people think like this.&lt;br&gt;
It’s much worse when it happens during recruitment.&lt;/p&gt;

&lt;p&gt;Because based on a contribution graph, you can’t tell:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;how good someone is,&lt;/li&gt;
&lt;li&gt;how busy they really are,&lt;/li&gt;
&lt;li&gt;or even whether the activity is meaningful at all.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One person may forget to commit or work mostly in private repositories. Another may solve complex problems for weeks with very few commits. Meanwhile someone else may just be running an automated job every day.🤷‍♂️&lt;/p&gt;

&lt;h2&gt;
  
  
  My own empty graph 🙃
&lt;/h2&gt;

&lt;p&gt;I’m actually a great example of this.&lt;/p&gt;

&lt;p&gt;Here is my &lt;em&gt;impressive&lt;/em&gt; GitHub contribution graph for 2023:&lt;/p&gt;

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

&lt;p&gt;So what happened in 2023? Maybe some of you will ask: “Sylwia, did you sleep through the whole year? Or maybe you won the lottery?” 🤔&lt;/p&gt;

&lt;p&gt;The truth is I was a tech lead in a startup building Anti-Money Laundering technology. I worked hard, built a lot of things, and honestly — thanks to contributions to my company’s private repositories, my GitHub looked pretty impressive.&lt;/p&gt;

&lt;p&gt;Then, in 2025, I changed job and was simply removed from those repositories. And just like that… my graph vanished.&lt;/p&gt;

&lt;p&gt;Today, I create small demo repositories once a month — and given my current lifestyle, I consider that &lt;em&gt;a lot&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually matters on GitHub 🧠
&lt;/h2&gt;

&lt;p&gt;Of course, there &lt;em&gt;is&lt;/em&gt; value in looking at someone’s GitHub more closely and seeing &lt;em&gt;what&lt;/em&gt; they build.&lt;/p&gt;

&lt;p&gt;Do they contribute to open source?&lt;br&gt;
Do they create their own interesting projects?&lt;/p&gt;

&lt;p&gt;Sometimes a person with a few solid projects and even a few months of inactivity is far more valuable than someone who commits a few lines of code every single day.&lt;/p&gt;

&lt;p&gt;And besides…&lt;/p&gt;

&lt;h2&gt;
  
  
  Not everyone has to contribute to open source 🚶‍♀️🚶‍♂️
&lt;/h2&gt;

&lt;p&gt;People contribute to the community in very different ways.&lt;/p&gt;

&lt;p&gt;For example, I like writing blog posts. It doesn’t stress me out, I enjoy sharing my thoughts, and writing comes easily to me. I write fast, I read fast, and I don’t use my brain while doing any of it. 😅 After a full day of coding at work — plus endless calls like “Sylwia, how does this work?” — writing code in the evening is simply exhausting.&lt;/p&gt;

&lt;p&gt;But I can easily imagine people for whom writing is painful, while coding after hours is pure relaxation.&lt;/p&gt;

&lt;p&gt;Others create tutorials.&lt;br&gt;
Some record videos.&lt;br&gt;
Some prepare conference talks.&lt;br&gt;
Some share work on StackBlitz or CodePen.&lt;/p&gt;

&lt;p&gt;And some are so deeply engaged in their full-time jobs that they simply have no time or energy left for anything else related to code.&lt;/p&gt;

&lt;p&gt;Which leads me to another question.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does everyone really need to be active in the community? 🧩
&lt;/h2&gt;

&lt;p&gt;IT is kind of a cultural anomaly here.&lt;/p&gt;

&lt;p&gt;Is there any other industry where people are almost &lt;em&gt;expected&lt;/em&gt; to work for free after hours for the benefit of others?&lt;br&gt;
Do journalists write free articles at night just in case?&lt;br&gt;
Do lawyers prepare guidelines for the community so they can get their next job?&lt;br&gt;
Do shopkeepers learn about the products they sell after work to better help customers? 🤔🤣&lt;/p&gt;

&lt;p&gt;I personally love the IT community and I’m happy to contribute. But not everyone has to.&lt;/p&gt;

&lt;p&gt;People have families, hobbies, and different priorities. Some just come to work, do their job well, and then live their lives. And you know what? They might still be absolutely brilliant developers — sometimes better than the loudest community heroes.&lt;/p&gt;

&lt;p&gt;Not every programmer has to be obsessed with IT or follow every new trend. We also need people who simply show up and deliver. And yes — we need them very much.&lt;/p&gt;

&lt;h2&gt;
  
  
  Over to you 💬
&lt;/h2&gt;

&lt;p&gt;How about you?&lt;br&gt;
Have you ever been asked about your GitHub contribution graph during recruitment?&lt;br&gt;
Or has no one ever mentioned it?&lt;/p&gt;

&lt;p&gt;I’m genuinely curious what your experience has been.&lt;/p&gt;

</description>
      <category>github</category>
      <category>discuss</category>
      <category>programming</category>
    </item>
    <item>
      <title>When React Starts Acting Like jQuery (and You Can Totally Tell 😅)</title>
      <dc:creator>Sylwia Laskowska</dc:creator>
      <pubDate>Thu, 08 Jan 2026 13:00:12 +0000</pubDate>
      <link>https://dev.to/sylwia-lask/when-react-starts-acting-like-jquery-and-you-can-totally-tell--3kpe</link>
      <guid>https://dev.to/sylwia-lask/when-react-starts-acting-like-jquery-and-you-can-totally-tell--3kpe</guid>
      <description>&lt;p&gt;I’m not a fangirl of any single framework. For me, frameworks are tools. Just like I prefer a good, sturdy hammer over a rusty one with holes... I also prefer tools that help me build software that’s maintainable and pleasant to work with. That’s why I like to stay up-to-date, understand how things work under the hood, and not just “use the thing everyone uses”.&lt;/p&gt;

&lt;p&gt;I work with Angular on a daily basis — and yes, Angular forces you into a certain architecture (although believe me, you &lt;em&gt;can&lt;/em&gt; still build absolute spaghetti in it… ask me how I know 😬).&lt;/p&gt;

&lt;p&gt;But I genuinely love React. Whenever I do a side project, I very often reach for it. I adore JSX and how close React feels to plain JavaScript, especially compared to Angular. But… you know what they say: with great power comes great responsibility 😎 And in the wrong hands… that freedom can burn a project.&lt;/p&gt;

&lt;p&gt;I’ve seen more than a few projects that weren’t just messy.&lt;br&gt;
They looked like someone wrote them in jQuery, deleted &lt;code&gt;$(document).ready&lt;/code&gt;, sprinkled some JSX over it… and genuinely tried to make it work 🤡&lt;/p&gt;

&lt;p&gt;Was it a blind migration from an old codebase?&lt;br&gt;
Was it devs who, deep in their hearts, never really left jQuery behind? 😉&lt;br&gt;
Hard to say.&lt;/p&gt;

&lt;p&gt;Either way - here are some &lt;strong&gt;classic signs your React code isn’t really React… it’s just jQuery wearing JSX&lt;/strong&gt;. And yes, it &lt;em&gt;shows&lt;/em&gt;. Loudly.&lt;/p&gt;


&lt;h2&gt;
  
  
  1️⃣ One giant component that “does everything”
&lt;/h2&gt;

&lt;p&gt;React file. Looks like &lt;code&gt;.tsx&lt;/code&gt;. Technically it has sub-components. Maybe even a utility for CSS class names. But emotionally?&lt;/p&gt;

&lt;p&gt;Emotionally, it feels like an &lt;strong&gt;old-school index.html with a giant script tag living inside&lt;/strong&gt; 😂&lt;/p&gt;

&lt;p&gt;Big blob. Fetching data. Updating UI. Managing events. Managing layout. Oh, and probably a modal, three dropdowns, a table and a sidebar too, because why not.&lt;/p&gt;
&lt;h3&gt;
  
  
  🧨 Example
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;App&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setData&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;([]);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;sidebarOpen&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setSidebarOpen&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setFilter&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/api/items&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;setData&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;loader&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;none&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;list&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;block&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;el&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;filter&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;input&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setFilter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"filter"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"loader"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Loading...&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;ul&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"list"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;ul&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setSidebarOpen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;sidebarOpen&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Toggle&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"sidebar"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;sidebarOpen&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  🤔 Why does this happen?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Someone migrated from jQuery and just shoved everything into one file.&lt;/li&gt;
&lt;li&gt;“It works, don’t touch it”.&lt;/li&gt;
&lt;li&gt;No architecture decisions early on.&lt;/li&gt;
&lt;li&gt;“We’ll refactor later” (we all know how that story ends).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  ✅ How it should be
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;split components by responsibility (Single Responsibility Principle)&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;separate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;data / logic components&lt;/li&gt;
&lt;li&gt;presentation components&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;move logic to custom hooks when appropriate&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;avoid direct DOM manipulation — let React own the UI&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;remember: lots of small components &amp;gt; one god-component&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  2️⃣ One giant &lt;code&gt;useEffect&lt;/code&gt; that does… everything
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;useEffect(() =&amp;gt; { /* 🤹‍♂️ everything happens here */ }, [])&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Fetching data, adding event listeners, toggling classes, updating the DOM, talking to 7 different services, scrolling, analytics, toast notifications… all in one glorious effect.&lt;/p&gt;

&lt;p&gt;Basically:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Take &lt;code&gt;$(document).ready&lt;/code&gt;, replace it with &lt;code&gt;useEffect&lt;/code&gt;, ship to prod 😎&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  🧨 Example
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/api/stats&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;setStats&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Dashboard&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;counter&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;resize&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toggle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;mobile&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerWidth&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;700&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;resize&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;resize&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;scrollTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;removeEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;resize&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;resize&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  🤔 Why does this happen?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Lack of mental model: “effect = place where magic happens”.&lt;/li&gt;
&lt;li&gt;Copy-paste from older code.&lt;/li&gt;
&lt;li&gt;“Hey, it runs once, perfect place for everything!”&lt;/li&gt;
&lt;li&gt;No understanding that effects should be focused and scoped.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  ✅ How it should be
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;every effect should have one clear responsibility&lt;/li&gt;
&lt;li&gt;split giant &lt;code&gt;useEffect&lt;/code&gt; into multiple focused effects&lt;/li&gt;
&lt;li&gt;don’t put logic in effects if it can live in render&lt;/li&gt;
&lt;li&gt;remember:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;useEffect !== lifecycle method&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;avoid stuffing all app behavior into a single “runs once” effect&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  3️⃣ &lt;code&gt;useEffect&lt;/code&gt; for things that should simply be in JSX
&lt;/h2&gt;

&lt;p&gt;This one hurts a little 😅&lt;br&gt;
Doing DOM manipulation in an effect just to update text, class, visibility, or something that JSX can declare naturally.&lt;/p&gt;

&lt;p&gt;Instead of:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;if condition → change DOM&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;React wants:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;if condition → render something else&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  🧨 Example
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;el&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;message&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;visible&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;visible&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Meanwhile React:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🤔 Why does this happen?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Still thinking imperatively:
“UI is something I &lt;em&gt;change&lt;/em&gt;, not something I &lt;em&gt;describe&lt;/em&gt;.”&lt;/li&gt;
&lt;li&gt;Old patterns:
“Everything dynamic? ➝ must go in useEffect!”&lt;/li&gt;
&lt;li&gt;Old habits die hard.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✅ How it should be
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;UI changes should be expressed declaratively in JSX&lt;/li&gt;
&lt;li&gt;show/hide things using conditional rendering&lt;/li&gt;
&lt;li&gt;derive classes from state, don’t toggle them manually&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;think:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“state changes → React rerenders”&lt;/li&gt;
&lt;li&gt;not “state changes → I patch the DOM”&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  4️⃣ A giant “switch” on CSS classes instead of real logic
&lt;/h2&gt;

&lt;p&gt;UI state stored… not in state&lt;br&gt;
…not in props&lt;br&gt;
…but… 🥁 &lt;strong&gt;in CSS class names&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The application logic becomes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“if it has this class then it means it’s open”&lt;/li&gt;
&lt;li&gt;“if it doesn’t then it’s closed”&lt;/li&gt;
&lt;li&gt;“if it has this plus that then it’s in some magic state nobody fully understands anymore”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Congrats, you built a state machine… in your stylesheet 🙃&lt;/p&gt;

&lt;h3&gt;
  
  
  🧨 Example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;steps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelectorAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;.step&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;step&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;step&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;click&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;active&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
      &lt;span class="nx"&gt;step&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;active&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🤔 Why does this happen?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Legacy thinking.&lt;/li&gt;
&lt;li&gt;“This used to work in jQuery, why change it?”&lt;/li&gt;
&lt;li&gt;CSS was used as a state holder for years — the habit sticks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✅ How it should be
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;keep UI state in React state or a store&lt;/li&gt;
&lt;li&gt;make UI derive from state instead of encoding logic in CSS&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;for complex flows consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;useReducer&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;a proper state machine&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;rule of thumb:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSS = styling&lt;/li&gt;
&lt;li&gt;React state = logic&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  5️⃣ Animations as “just toggle the class in JS”
&lt;/h2&gt;

&lt;p&gt;Need animation?&lt;/p&gt;

&lt;p&gt;Add/remove class in JS. Done.&lt;br&gt;
React? Oh yes, still technically there 👀 Just quietly watching.&lt;/p&gt;

&lt;p&gt;No state. No declarative transitions. No structure.&lt;/p&gt;

&lt;p&gt;Just:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;click → add class → remove class later → hope nothing breaks&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  🧨 Example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Notification&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;btn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;show&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;box&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;note&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nx"&gt;btn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onclick&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;visible&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;visible&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"show"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Show&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"note"&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"notification"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Hello!&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🤔 Why does this happen?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Familiar old pattern.&lt;/li&gt;
&lt;li&gt;Quick hack delivered to production.&lt;/li&gt;
&lt;li&gt;Zero time allocated for frontend architecture.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✅ How it should be
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;base animation triggers on React state, not manual DOM&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;simplest option:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;state → class toggle in JSX&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;better options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSS transitions driven by state&lt;/li&gt;
&lt;li&gt;React Transition Group&lt;/li&gt;
&lt;li&gt;Framer Motion&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;avoid imperatively driving animations when you can declare them&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  6️⃣ Keeping DOM elements inside state 😱
&lt;/h2&gt;

&lt;p&gt;Rare… but I’ve seen it.&lt;br&gt;
And once you see it, you never really forget it — it leaves a mark 😅&lt;/p&gt;

&lt;p&gt;&lt;code&gt;useState&amp;lt;HTMLDivElement | null&amp;gt;(null)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And then logic like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“if we have this element, do things directly on it”&lt;/li&gt;
&lt;li&gt;instead of storing &lt;strong&gt;intent&lt;/strong&gt; in state.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s not React. That’s absolutely raw DOM puppet-mastering.&lt;/p&gt;

&lt;h3&gt;
  
  
  🧨 Example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setEl&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;setEl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;target&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;highlight&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;background&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;yellow&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🤔 Why does this happen?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Confusing refs, state, and DOM.&lt;/li&gt;
&lt;li&gt;Treating React as just a helper to render markup.&lt;/li&gt;
&lt;li&gt;Not really understanding React’s role at all.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✅ How it should be
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;if you need to access DOM → use &lt;code&gt;ref&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;store &lt;strong&gt;intent&lt;/strong&gt; in state, not raw DOM nodes&lt;/li&gt;
&lt;li&gt;DOM is implementation detail&lt;/li&gt;
&lt;li&gt;state describes &lt;em&gt;what you want to happen&lt;/em&gt;, not &lt;em&gt;how to mutate the element&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💬 Why this matters
&lt;/h2&gt;

&lt;p&gt;I’m not saying code must always be perfect.&lt;br&gt;
Sometimes quick hacks are fine. Sometimes deadlines win. Sometimes legacy constraints are real.&lt;/p&gt;

&lt;p&gt;But when React is used like jQuery with JSX…&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;maintenance becomes nightmare&lt;/li&gt;
&lt;li&gt;team onboarding becomes painful&lt;/li&gt;
&lt;li&gt;bugs hide in dark corners nobody understands&lt;/li&gt;
&lt;li&gt;architecture collapses under its own weight&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;React is powerful not because it manipulates DOM better.&lt;br&gt;
It’s powerful because:&lt;br&gt;
✨ &lt;strong&gt;State → UI&lt;/strong&gt;&lt;br&gt;
not&lt;br&gt;
🔧 &lt;strong&gt;UI → patch → patch → patch&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🤍 A little reflection
&lt;/h2&gt;

&lt;p&gt;React gives freedom. And that freedom is beautiful.&lt;br&gt;
But freedom requires responsibility. Without it, React becomes:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;a jQuery with better branding&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And that’s a bit sad, because React &lt;em&gt;can&lt;/em&gt; give us structure, clarity, predictability — if we let it.&lt;/p&gt;

&lt;p&gt;If your project smells like the things above…&lt;br&gt;
it’s not a shame.&lt;br&gt;
It just means there is history, pressure, context, and human decisions behind it.&lt;/p&gt;

&lt;p&gt;But maybe it also means…&lt;/p&gt;

&lt;p&gt;it’s time to pause, breathe, and rethink a little 😊&lt;/p&gt;




&lt;h2&gt;
  
  
  🙋‍♀️ Your turn
&lt;/h2&gt;

&lt;p&gt;I’m super curious:&lt;/p&gt;

&lt;p&gt;👉 Have you seen “React in jQuery cosplay” in the wild?&lt;/p&gt;

&lt;p&gt;Share your stories, scars, confessions, or survival tips!&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Yes, true + true === 2. And No, JavaScript Isn’t Broken</title>
      <dc:creator>Sylwia Laskowska</dc:creator>
      <pubDate>Sun, 04 Jan 2026 12:19:52 +0000</pubDate>
      <link>https://dev.to/sylwia-lask/yes-true-true-2-and-no-javascript-isnt-broken-37p7</link>
      <guid>https://dev.to/sylwia-lask/yes-true-true-2-and-no-javascript-isnt-broken-37p7</guid>
      <description>&lt;p&gt;JavaScript has been my main work language for years now (and of course these days it’s mostly TypeScript 😉). I started working with it before ES6, back when the language felt a lot more “primitive” than it does today – no let or const, no spread operators, no Promises, not even classes, only prototypes.&lt;/p&gt;

&lt;p&gt;Writing JS back then was pure chaos in the best and worst sense – a total roller coaster where you really had to understand the language to avoid shooting yourself in the foot. I remember reading a ton about it. The books that really stuck with me were &lt;strong&gt;You Don’t Know JS&lt;/strong&gt; (&lt;strong&gt;later You Don’t Know JS Yet&lt;/strong&gt;) by Kyle Simpson. You can still find them on GitHub today, and they’re an absolute goldmine of JavaScript knowledge. &lt;/p&gt;

&lt;p&gt;So nowadays, when yet another backend colleague laughs at JS quirks like &lt;code&gt;true + true === 2&lt;/code&gt;, I just smile politely and nod… while internally screaming: &lt;em&gt;“but it’s completely obvious, because this and that and also…”&lt;/em&gt; xDDD I used to actually try to explain it, but usually after about 10 seconds they’d just stare at me like I’d lost my mind, so I gave up 😅&lt;/p&gt;

&lt;p&gt;But here, on dev.to, I’m hoping I’ll find people who actually want to hear the explanation 😂&lt;/p&gt;

&lt;p&gt;I could write one long article about a bunch of JavaScript oddities, but how about a weekend series instead? If you like the idea, hit the like button 😉&lt;/p&gt;

&lt;h2&gt;
  
  
  Why &lt;code&gt;true + true === 2&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Here’s one of JavaScript classics people love to joke about:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At first glance, this feels ridiculous.&lt;br&gt;
How can adding two booleans give you a number?&lt;/p&gt;


&lt;h3&gt;
  
  
  The key: &lt;code&gt;+&lt;/code&gt; is (mostly) a numeric operator
&lt;/h3&gt;

&lt;p&gt;In JavaScript, the &lt;code&gt;+&lt;/code&gt; operator works in two modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;if there’s a string involved → &lt;strong&gt;string concatenation&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;otherwise → &lt;strong&gt;numeric addition&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since &lt;code&gt;true&lt;/code&gt; isn’t a string, JavaScript assumes this is math and converts both values to numbers.&lt;/p&gt;


&lt;h3&gt;
  
  
  And what is the numeric value of &lt;code&gt;true&lt;/code&gt;?
&lt;/h3&gt;

&lt;p&gt;JavaScript uses a standard internal conversion rule called &lt;strong&gt;ToNumber&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;true&lt;/code&gt; → &lt;code&gt;1&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;false&lt;/code&gt; → &lt;code&gt;0&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="c1"&gt;// becomes&lt;/span&gt;
&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="c1"&gt;// which equals&lt;/span&gt;
&lt;span class="mi"&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This isn’t random. Many languages treat booleans as numeric under the hood:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python: &lt;code&gt;True + True === 2&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;C / C++: &lt;code&gt;true&lt;/code&gt; behaves as &lt;code&gt;1&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So again, JavaScript is not being uniquely weird here - it’s actually pretty normal computer science behavior.&lt;/p&gt;




&lt;h3&gt;
  
  
  It also explains other “strange” cases
&lt;/h3&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;   &lt;span class="c1"&gt;// 10&lt;/span&gt;
&lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;  &lt;span class="c1"&gt;// 0&lt;/span&gt;
&lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;    &lt;span class="c1"&gt;// 0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you know booleans convert to &lt;code&gt;1&lt;/code&gt; and &lt;code&gt;0&lt;/code&gt;, nothing here is magical anymore.&lt;/p&gt;




&lt;h3&gt;
  
  
  Practical takeaway
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;+&lt;/code&gt; performs numeric addition unless strings are involved&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;true&lt;/code&gt; converts to &lt;code&gt;1&lt;/code&gt;, &lt;code&gt;false&lt;/code&gt; converts to &lt;code&gt;0&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;it’s not JavaScript being silly - lots of languages behave similarly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And that’s why &lt;code&gt;true + true === 2&lt;/code&gt; is not a bug… just logic wearing a funny hat 😎&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>“Why Do You Code?” - A Surprisingly Hard Question</title>
      <dc:creator>Sylwia Laskowska</dc:creator>
      <pubDate>Tue, 30 Dec 2025 13:03:01 +0000</pubDate>
      <link>https://dev.to/sylwia-lask/why-do-you-code-a-surprisingly-hard-question-4ak4</link>
      <guid>https://dev.to/sylwia-lask/why-do-you-code-a-surprisingly-hard-question-4ak4</guid>
      <description>&lt;p&gt;The end of the year is coming, and for me it’s always a time of reflection. I’d like to invite you to ask yourself one simple question.&lt;br&gt;
Imagine that from January, the IT job market simply stops existing. No more well-paid jobs, no more “career in tech”. Programming becomes &lt;em&gt;just&lt;/em&gt; a hobby.&lt;/p&gt;

&lt;p&gt;Do you keep coding?&lt;br&gt;
Or do you throw it all away and say “I’m done”? 😅&lt;/p&gt;

&lt;p&gt;To be honest, my own answer isn’t that simple. I’ve technically been coding “forever” — I wrote my first website when I was 12, back in glorious HTML 4.01 😎 But programming has always been more of a &lt;strong&gt;medium of expression&lt;/strong&gt; for me than a goal in itself.&lt;/p&gt;

&lt;p&gt;Over the years, my approach to coding has evolved a lot — maybe you’ll recognize yourself somewhere on this spectrum 👇&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 First, there was curiosity
&lt;/h3&gt;

&lt;p&gt;How does this even work? Why does something show up on the screen? How does the internet work? How do you build your &lt;em&gt;own&lt;/em&gt; website?&lt;br&gt;
That curiosity is still there. I love exploring new technologies and playing with things.&lt;br&gt;
But let’s be honest… curiosity doesn’t pay the bills 😉&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 Then came the money phase 💸
&lt;/h3&gt;

&lt;p&gt;If I already have this skill, why not make a career out of it?&lt;br&gt;
I still remember my first manager laughing when, after my internship, he asked about my career plans and I said:&lt;br&gt;
“Well… I don’t really have any. I just wanted to become a junior developer and I did it.” 😄&lt;br&gt;
Luckily he was a great guy and helped me figure out what to do next.&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 Then I went full tech-fangirl mode 🤓
&lt;/h3&gt;

&lt;p&gt;New stacks! New frameworks! No legacy ever!&lt;br&gt;
It didn’t really matter what the project &lt;em&gt;did&lt;/em&gt; — NGO app or cigarette factory system — what mattered was ANGULAR/REACT/VUE (delete as appropriate 😂). Definitely the newest store management, the newest tools, shiny everything.&lt;/p&gt;

&lt;p&gt;I never reached the “I’ll build the worst garbage as long as it pays” mindset… but yeah, once I had the skills and leverage, I negotiated my rates pretty hard 😉&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 And then… the famous “what now?” stage
&lt;/h3&gt;

&lt;p&gt;You know the one.&lt;br&gt;
I’m not building a revolutionary product. I’m not inventing a new framework. I’m not writing a browser engine. I’m not a startup founder.&lt;/p&gt;

&lt;p&gt;I work in regular enterprise Angular. Problems start feeling repetitive, pressure grows, everything “has already been done”, expectations rise.&lt;br&gt;
Yep. That’s a very comfy road straight to burnout 🥲&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 So I had to figure things out
&lt;/h3&gt;

&lt;p&gt;I didn’t want to leave tech — I genuinely &lt;em&gt;like&lt;/em&gt; programming.&lt;br&gt;
So I decided: if I’m spending 8 hours a day coding anyway, those 8 hours better &lt;strong&gt;mean something&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Since then, whenever I changed jobs, I paid a lot more attention to the project itself. It needed to tick at least one (ideally both) boxes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;interesting technology&lt;/li&gt;
&lt;li&gt;social impact / meaningful purpose&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks to that, I’ve helped build a Fair Trade certification platform, software for retirement homes, hospital equipment management tools, worked in anti–money laundering, and now I work for the European Commission on a huge socially important project. And I can even visit Brussels a few times a year. 🥰&lt;/p&gt;

&lt;p&gt;And yeah — work is still work. We joke, gossip, talk about the gym, complain, drink coffee. Nothing magical 😅&lt;br&gt;
But if every job more or less &lt;em&gt;feels&lt;/em&gt; the same, and I &lt;em&gt;can&lt;/em&gt; choose the kind of work I do… why not choose something that actually contributes something good to the world? 🌍&lt;/p&gt;




&lt;p&gt;So now I’m curious:&lt;/p&gt;

&lt;h3&gt;
  
  
  👉 Why do &lt;strong&gt;you&lt;/strong&gt; code?
&lt;/h3&gt;

&lt;p&gt;What’s your motivation today?&lt;br&gt;
Would you still do it if programming was &lt;em&gt;only&lt;/em&gt; a hobby?&lt;/p&gt;

&lt;p&gt;Share your thoughts — I’d love to read your stories! 💬&lt;/p&gt;

</description>
      <category>programming</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
