DevIdiot!
6 Years of React: Architecture Lessons That Actually Scale
I'm Mohd Zakir Hassan, a Tech Lead with 6+ years of building React applications used by thousands of people. These are the habits that have held up as teams and products grew. Components should do one thingIf a component fetches data, formats it, and renders a complex UI, split it. Containers handle data; presentational components handle looks. Make state predictableKeep server state (data from APIs) separate from UI state (is this modal open?). Tools like React Query for server state
Why Optimistic UI Updates Make Your Apps Feel Instant
What Are Optimistic UI Updates?An optimistic UI update is a frontend design pattern where a web application immediately updates its screen to show the result of a user's action before getting confirmation from the backend server. Instead of freezing the screen or displaying a loading spinner while waiting for a network request—the process of sending data across the internet to a remote server—the app acts optimistic. It predicts that the server request will succeed 99% of the time, updates
Next.js 16 "use cache": cacheLife, cacheTag, updateTag and the build errors you'll hit
With Cache Components on, Next.js 16 treats data as dynamic until you say otherwise, and next build stops when you forget to choose. That's useful once you know what each error wants.I built a small notes app on a fresh create-next-app and hit each error below on purpose. Every snippet was built with next build and run with next start; the form was tested with Playwright. Versions: Next.js 16.4.6, React 19.3.0, Node 22. 1. Check that Cache Components is onA fresh create-next-app (16.4.6) ge
Angular vs React in 2026: Which One Survives AI-Written Code?
I've built with both using Cursor. One writes faster. The other stays clean.In my last post, Angular vs Next.js in 2026, I said the real tradeoff wasn't Angular vs React.Some of you didn't love that answer.Fair enough. Not everyone needs a full-stack framework. Plenty of teams still spin up a plain React app with Vite, connect it to an API, and ship.So let's talk about it.But here's the thing. In 2026, I barely write code by hand anymore (my keyboard is mostly for prompts and code review now). C
`use()` Breaks the Rules of Hooks on Purpose. Here's the Catch.
You rip out a useEffect, a useState, and a cleanup flag, replace all three with one line of use(), and the component looks cleaner than it has in months. Then you refresh the page and the loading spinner never stops. Network tab: the same request, firing again, and again, every few milliseconds, forever.Nothing in the code is wrong, exactly. You just found the one rule use() actually enforces — by being the React API that's allowed to break every other rule. The dance use() was built to end
Next.js 16.3 error.js: retry vs reset Aren't Interchangeable
Next.js 16.3 shipped something that looks, at first glance, like a naming nitpick: error.js's recovery callback is officially called retry() now, not reset(). It isn't a rename. retry() re-fetches and re-renders your error boundary's children from scratch; reset() only clears the error state and re-renders whatever the client already has. If your error.js's "Try again" button has been wired to reset() since you copied it from a tutorial a couple of years ago, there's a good chance it has never o
You're debouncing search input. `useDeferredValue` skips the timer.
Type react into a search box filtering 10,000 rows, and watch the input lag half a beat behind your own keystrokes. Open React DevTools and the component isn't broken — it's doing exactly what you told it to. It's just doing all of it, every time, before it lets the next character land.The fix half the internet reaches for is a debounce. Wait 300ms after the user stops typing, then filter. It feels like it should work — fewer renders, less work. Try it in a real app and the stutter doesn't go aw
Fifty email templates on our site are rows in an array, a unit test proofreads them, and not one contains an exclamation mark
Nakodo's public pages are typed objects rather than MDX, which means a page is an array of blocks and a block is a member of a union:export type Block = | { type: "p"; text: Rich } | { type: "list"; items: Rich[]; ordered?: boolean } | { type: "steps"; items: { title: string; text: Rich }[] } | { type: "table"; caption?: string; head: string[]; rows: Rich[][] } /** A message the reader can copy. `subject` empty for direct messages. Use [Brackets] for the parts to fill in. */ | { type: "tem
One regex reads a pasted column of view counts, and pasting the whole page instead gives twelve numbers for three videos
Nakodo has a handful of free calculators on its public side, and until last week all four of them were forms: rows of fields, three numbers per row, up to ten rows. The fifth one is different, because the question it answers needs more numbers than anybody will type into boxes.The average views calculator asks for the view counts of the last ten to twenty videos on a channel. That is one textarea and one regex, and this post is about the regex, what it gets right, and the paste shape that makes
Our dashboard's status counts overlapped, so they never added up to the total
Take a dashboard with a row of status counters: 11 active, 4 declining, 3 new, 3 dead, 2 never seen. Add them up and you get 23. The project has 18 features.Nobody on the team was confused by this, because we all knew that a declining feature is still an active one, and so is a new one. Those counters were each answering their own question ("how many features are declining?") and every one of them was correct. They just weren't parts of a whole, and the moment you draw them as parts of a whole,
Already Know React? It's Time to Become a Full-Stack Developer! 🚀
Are you a frontend developer who wants to become a full-stack developer? Or are you a beginner looking to start your journey in web development?Learning the MERN Stack is a great way to get started with full-stack development. It allows you to use JavaScript across the entire application, from building interactive user interfaces to developing backend APIs and managing databases.To help developers learn these technologies, I've created a new course: 🚀 Master the MERN Stack: Build Full-Stack
Benchmarking marginal and cliff sales accelerators to the cent
A $3,000 deal takes credited period sales from $9,000 to $12,000. With a 5% base rate and an 8% accelerator at $10,000, it posts $210.00 under marginal tiers or $510.00 under a retroactive period cliff. Both outcomes show 120.00% attainment against a $10,000 quota. Calculate the change in earned commissionUnder marginal tiers, the first $1,000 of the deal earns 5%, and the next $2,000 earns 8%. Under the retroactive cliff, reaching the threshold reprices every credited cent of the period at
Deno is winding down: I ran a Deno-to-Node codemod on 27 real repos
On October 9 Ryan Dahl posted that the Deno team is joining Cloudflare. The runtime gets one more year of monthly bug and security releases, and then the team stops developing it. Deno Deploy now has a banner in its docs: it will be sunset in April 2027. Val Town, which runs on Deno, goes read-only on December 10 and keeps vals running until January 10, and its migration guide points people at Node, Bun or a provider runtime like Cloudflare Workers.I went looking for a tool that would move a Den
What Do Web Developers Actually Use JavaScript For? 10 Practical Uses Beyond Buttons and Animations
When people hear the word JavaScript, they often think about interactive buttons, dropdown menus, animations, and other visual effects on websites.And that's understandable.These are some of the first things beginners encounter when learning JavaScript.But here's an important question:Is JavaScript really just a tool for making websites interactive, or is there much more happening behind the scenes?The answer is simple: there's much more.JavaScript is a programming language developers use to imp
How to prove a web app doesn't upload your files
Every "free online PDF tool" asks you to upload. If the document is a contract, an ID scan or a medical record, that upload is a risk you cannot audit — and it happens before you can see anything. So the privacy claim is everywhere and nobody can check it.It is checkable. Not by reading a privacy policy, but by watching what the browser actually sends. Below is the test I use, the two ways that test can be fooled, and the results of running it on a tool I built that claims to pass. Verifiab
Benchmarking CAM gross-up and controllable caps in integer cents
A tenant with a 10% area share and $5,000 in CAM advances owes $500.00 under a linear cumulative expense cap or $576.25 under a compounded cap. The anchor pool, annual increase, occupancy, and actual expenses stay the same. The cap language moves $76.25 onto the tenant statement. Normalize the building pool before allocating itStart with $80,000 of variable controllable common area maintenance (CAM) at 80% occupancy, $20,000 of fixed controllable expense, and $40,000 of fixed uncapped expen
async vs defer: Why Script Order Breaks Your Page
You add async to two script tags to speed up the page. Now it breaks one load in ten with $ is not defined. The plugin ran before the library it needs.async vs defer is a question about when a script runs, not how it downloads. The mental modelBoth download in the background. async runs the moment it lands. defer waits in line until the HTML is done.Picture food deliveries arriving while you set a table. async serves each dish the second it comes through the door, in whatever order the driv
Benchmarking SRT and WebVTT subtitle QC in JavaScript
A half-second cue containing <i>OK</i><b>!</b> renders as OK! at 6 characters per second. Counting the raw 17 JavaScript code units makes it appear to run at 34 CPS. That shortcut also misses a second failure when the cue sits inside a long-running subtitle and a later cue starts before the long cue ends. Count what reaches the screenStrip supported formatting tags and decode entities before counting. Then segment the result by grapheme. An accented letter formed fro
How to Add Particle Effects to Your 2D Game with Claude
The fastest way to get weak effects from an AI assistant is to ask for them one at a time with no context. You get a spark here and a glow there, and none of it looks like it belongs to the same game.The workflow below is the one we recommend to SlotVFX users who want every particle effect in their game built with Claude. It starts by connecting SlotVFX, lets the assistant write a proper game design document, keeps the effects work and the engine work apart, and ends with a handoff Claude Code c
URLSearchParams Encodes Meta Ads Tokens: Building a Template-Aware UTM Serializer
A campaign URL builder has two jobs: encoding ordinary text and preserving placeholders that another system will interpret later. Mixing those jobs produces convincing output. The URL looks valid, but the template handed to the advertising platform is no longer the text the operator entered.This walkthrough uses {{campaign.name}} as a concrete example. The reproducible issue is JavaScript serialization, not a claim that every Meta Ads flow rejects encoded braces. Whether a platform decodes a val