Skip to content
TILens What matters today in tech v0.4.0
Theme
Topics - JavaScript
Calendar · NOV 2026
‹ Nov 2026 ›
  1. JAN
  2. FEB
  3. MAR
  1. APR
  2. MAY
  3. JUN
  1. JUL
  2. AUG
  3. SEP
  1. OCT
  2. NOV
  3. DEC
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
Favorites (0)

News stream

News

Weighted overtime average: when one worker has two different hourly rates

Most overtime calculators assume one hourly rate. Real work is messier. I know people who stock shelves at $20 an hour on weekdays and wash dishes at $14 an hour at the weekend, all for the same employer. When that week hits 50 hours, which rate…

devto-javascript

`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,…

devto-javascript

Template Literal Types Explained: Catching Path Typos at Compile Time

Somewhere in your codebase there's a function that looks like this: function get(obj: any, path: string) { return path.split(".").reduce((acc, key) => acc?.[key], obj); } const primaryColor = get(config, "theme.colros.primary"); Read that path…

devto-javascript

Your WebSocket Reconnects Fine. The Messages It Missed Never Do.

The badge in the corner goes from green to red to green again. Three seconds, tops — long enough to walk through a subway turnstile, short enough that nobody files a bug. Your reconnect logic did exactly its job: it noticed the drop, waited, and…

devto-javascript

Next.js 16 use cache: remote vs use cache: private

A team ships personalized product recommendations on a product page. The data depends on the visitor's session cookie, so a teammate wraps the fetch in a plain 'use cache' function and reads cookies() inside it. next build passes. next start…

devto-javascript

TypeScript Type Narrowing: The Complete Guide

You write function greet(value: string | null), guard it with if (value === null) return;, and schedule a setTimeout callback that uses value. Right after scheduling it, you reset value back to null — a one-line cleanup, nothing dramatic. TypeScript…

devto-javascript

TypeScript Can't Tell userId From orderId. Branded Types Can.

A support engineer is looking at a refund ticket. They copy an ID from one browser tab, paste it into another, and call issueRefund(id). The function signature says id: string. The ID they pasted is a string. TypeScript has nothing to say about it.…

devto-javascript

I taught Knip where Mastra keeps its files

Your app uses a file every time it starts, and your cleanup tool says you can delete it. That was life for anyone running Knip on a Mastra project. I wrote the Mastra plugin for Knip in webpro-nl/knip#2227, after joealden asked for one in issue…

devto-javascript

Custom Chrome DevTools Panels: Build One With Manifest V3

Originally published on ExtensionBooster. Custom Chrome DevTools panels let you put your own debugging UI right beside Elements, Console and Network, which is exactly how tools like React DevTools and Redux DevTools work. The tricky part is not the…

devto-javascript

Cleaning API Payloads and Delimited Lists Faster in the Browser

Working with APIs, test fixtures, and spreadsheet exports often comes down to two repetitive data-prep tasks: Validating and editing nested JSON payloads without breaking syntax. Turning raw newline-separated lists (IDs, emails, SKUs, or SQL filter…

devto-javascript

A Simple Shopify Cart Chatbot in 30 Lines of JavaScript

A Simple Shopify Cart Chatbot in 30 Lines of JavaScript Most shoppers don't abandon a cart because of the product. They leave over small doubts about delivery, COD, or a coupon. Here's a tiny bot that answers those on the cart page. Read the cart…

devto-javascript

Drawing voxel pets on a plain 2D canvas (no WebGL, no three.js)

I wanted chunky, cute voxel pets for a focus timer, and I wanted them to stay smooth on a cheap Android phone. So instead of WebGL or a 3D library, the pets are drawn by a tiny ray caster that writes pixels into an ordinary 2D canvas. The whole…

devto-javascript

TypeScript 7 Upgrade Guide: Migrating to the Go Compiler

Originally published at muhammadmoiz.dev. The TypeScript 7 upgrade is worth doing now for most projects. Version 7.0 (currently 7.0.2) swaps the JavaScript compiler for a native one written in Go, and full builds typically run 8 to 12 times faster.…

devto-javascript

Gentle Daily Stretching and Posture Tips for Desk Workers

Spending long hours sitting at a desk can make shoulders, neck, and lower back feel stiff by evening. Standing up for a couple of minutes every hour and doing gentle stretches helps improve circulation and ease tension. Many people also pair light…

devto-javascript

1997 items available