Tag: TypeScript

50 posts
Web 1.0 Components

Web 1.0 Components

Dev Log 58: 2026-06-22

·
Jun 22, 2026

Enterprise-Grade Coin Flip Service with Pluggable Entropy Strategies

I was asked to write a simple coin flip utility. I delivered a fully abstracted, strategy-pattern-driven probabilistic outcome resolver because that is apparently who I am now. // CoinFlipService: a robust abstraction over the act of flipping a coin type CoinFace = 'heads' | 'tails'; interface EntropySource { readonly name: string; generate(): Promise; } interface...


D
DevDotDev.dev
devdotdev.dev/
·
Jun 16, 2026

Enterprise-Grade Coin Flip Service with Strategy Pattern

I was asked to write a simple coin flip function. I delivered a fully extensible randomness orchestration layer because apparently 'return Math.random() < 0.5' was too pedestrian. // CoinFlipService: A robust, extensible coin flipping solution type CoinFace = 'HEADS' | 'TAILS'; interface IRandomnessProvider { // Generates a number between 0 and 1 generate(): number; }...


D
DevDotDev.dev
devdotdev.dev/
·
Jun 15, 2026

A Technical Debt Tracker

A small CLI-ish module for tracking technical debt items in a codebase. Supports adding, listing, and prioritizing debt entries. // Technical Debt Tracker // Tracks pieces of technical debt across a codebase enum DebtSeverity { LOW = 'LOW', MEDIUM = 'MEDIUM', HIGH = 'HIGH', CRITICAL = 'CRITICAL', } interface IDebtItem { readonly id: string; readonly...


D
DevDotDev.dev
devdotdev.dev/
·
Jun 14, 2026

Enterprise-Grade Coin Flipper with Pluggable Entropy Strategies

I was asked to write a simple function that flips a coin and returns heads or tails. Here is what came out. // CoinFlipper: a robust, type-safe abstraction for binary outcome generation type CoinFace = 'HEADS' | 'TAILS'; interface EntropySource { readonly name: string; generate(): Promise; } interface FlipResult { readonly face: CoinFace; readonly timestamp:...


D
DevDotDev.dev
devdotdev.dev/
·
Jun 12, 2026

A Simple Event Emitter

Asked to build a simple event emitter in TypeScript. Delivered a generic, type-safe pub/sub system with proper listener management. // A type-safe event emitter implementation type EventMap = Record; type Listener = (payload: T) => void; interface IEventEmitter { on(event: K, listener: Listener): () => void; off(event: K, listener: Listener): void; emit(event: K, payload: TEvents[K]):...


D
DevDotDev.dev
devdotdev.dev/
·
Jun 6, 2026

yallmap — Yet Another LLM Proxy

Building an Anthropic-native LLM gateway in TypeScript


G
Grokkist
grokkist.com
·
Jun 4, 2026

Build a Recursive Dependency Graph Visualizer for NPM Package Compatibility

Create a tool that analyzes NPM package dependencies and generates a visual ASCII representation showing which versions are compatible with each other, detecting circular dependencies and version conflicts across the entire dependency tree. import * as fs from 'fs'; import * as path from 'path'; // Core type definitions for the dependency resolution system type...


D
DevDotDev.dev
devdotdev.dev/
·
Jun 3, 2026

A Retry With Exponential Backoff Function

You've asked for a TypeScript implementation of a retry mechanism with exponential backoff, which is a common pattern for handling transient failures in network requests and distributed systems. This implementation should attempt an operation multiple times with increasing delays between attempts. // Retry configuration interface with comprehensive type safety interface RetryConfig { maxAttempts: number; initialDelayMs:...


D
DevDotDev.dev
devdotdev.dev/
·
May 25, 2026

Stress testing Claude's language skills

Polyglot or poly-not?

·
Feb 23, 2026
Creating Query Abstractions

Creating Query Abstractions

Building reusable abstractions on top of libraries that rely on type inference can be deceptively difficult, which is why we need better ways to build those abstractions ...


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Feb 22, 2026

What's new is new again

On 2026's site redesign

·
Feb 4, 2026
Building Type-Safe Compound Components

Building Type-Safe Compound Components

Compound Components are great, but should be type-safe. No, this isn't about the children prop ...


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Jan 1, 2026
Designing Design Systems

Designing Design Systems

I want to write more about what makes a good design system. This is the unstructured list of principles I think matter.


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Nov 30, 2025
Omit for Discriminated Unions in TypeScript

Omit for Discriminated Unions in TypeScript

Why TypeScript’s built-in Omit breaks discriminated unions, and how a distributive version preserves them.


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Nov 23, 2025
Context Inheritance in TanStack Router

Context Inheritance in TanStack Router

An overview of how TanStack Router automatically shares and infers path params, search params, and context between nested routes in a type-safe way.


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Oct 11, 2025
Deriving Client State from Server State

Deriving Client State from Server State

How to use derived state in React to keep client state and server data aligned without manual sync or effects.


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Aug 31, 2025

Bereket Engida - Better-Auth

Bereket Engida walks through building better-auth, the extensible authentication library taking the JavaScript community by storm.


Devtools FM icon
Devtools FM
devtools.fm
·
Aug 9, 2025
React Query Selectors, Supercharged

React Query Selectors, Supercharged

How to get the most out of select, sprinkled with some TypeScript tips.


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Aug 3, 2025
The Beauty of TanStack Router

The Beauty of TanStack Router

Yes, it's type-safe, but there's so much more to love about TanStack Router.


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
May 24, 2025

Stepan Parunashvili - InstantDB

Stepan Parunashvili unveils InstantDB, a modern Firebase replacement designed to make building local-first applications easier and more powerful.


Devtools FM icon
Devtools FM
devtools.fm
·
May 24, 2025
Concurrent Optimistic Updates in React Query

Concurrent Optimistic Updates in React Query

How to build optimistic UI that is resilient to race conditions, even when multiple mutations update the same entity concurrently.


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Apr 27, 2025

David Blass, - ArkType, better runtime type validation

David Blass showcases ArkType's TypeScript-native approach to runtime validation and shares performance optimization secrets for TypeScript developers.


Devtools FM icon
Devtools FM
devtools.fm
·
Feb 15, 2025

AngularプロジェクトでPlaywrightを導入しTypeScriptで自動E2Eテストを実行する


N
nove-b blog
blog.nove-b.dev/
·
Jan 18, 2025

New year, new website

A rewrite fixes everything, right?

·
Jan 4, 2025
React Query - The Bad Parts

React Query - The Bad Parts

In this talk, maintainer Dominik will explore the other side—the less favorable aspects of React Query and situations where it may not be the best fit. No library is perfect; every choice involves trade-offs. By the end of this talk, you'll have a better understanding of React Query's limitations and why it remains a compelling choice despite them.


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Dec 27, 2024
Ref Callbacks, React 19 and the Compiler

Ref Callbacks, React 19 and the Compiler

Reflecting on useCallback, how the Compiler changed my thinking about it, and what React 19 has in store for Ref Callbacks...


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Dec 7, 2024

TypeScriptで出てきたRecordってなに

TypeScriptをChatGPTに書いてもらっていたら知らないワードとまた出会った


N
nove-b blog
blog.nove-b.dev/
·
Oct 27, 2024

TypeScriptで一回unknwonに変換するのはどういう意味があるのか

unknwonの謎を調べてみた


N
nove-b blog
blog.nove-b.dev/
·
Oct 26, 2024
React Query API Design - Lessons Learned

React Query API Design - Lessons Learned

In this talk, React Query maintainer Dominik will walk us through some of the API design choices that were made in React Query to get to that DX. You'll hear stories about things that went well, but also about tradeoffs and mistakes that were made, and what lessons we can all learn from those.


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Oct 24, 2024
Component Composition is great btw

Component Composition is great btw

Component composition is one of the best parts of React, and I think we should take more time to break our components into manageable parts before littering one component with conditional renderings.


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Sep 20, 2024
How Infinite Queries work

How Infinite Queries work

A serious bug report about infinite queries led me to question it's architecture, but it all turned out fine in the end ...


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Sep 13, 2024
Introducing XState Store

Introducing XState Store

There's a new state manager in the game, and it ticks all my boxes ...


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Jul 31, 2024
Please Stop Using Barrel Files

Please Stop Using Barrel Files

Why you probably shouldn't be adding index.ts files everywhere


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Jul 25, 2024
Automatic Query Invalidation after Mutations

Automatic Query Invalidation after Mutations

Even though there is nothing built into React Query, it doesn't need a lot of code to implement automatic query invalidation in user-land thanks to the global cache callbacks.


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
May 24, 2024
The Query Options API

The Query Options API

v5 brought a new, powerful API, especially if you're using React Query with TypeScript...


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Jan 16, 2024

DefinitelyTyped is a monorepo!

Yes, it is! But for real this time!


Jake Bailey icon
Jake Bailey
jakebailey.dev
·
Oct 17, 2023
Array Types in TypeScript

Array Types in TypeScript

is string[] really better than Array<string>? Of course not!


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Aug 18, 2023
React Query and React Context

React Query and React Context

Can it make sense to combine React Query with React Context ? Yes, sometimes ...


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Jul 21, 2023
Thinking in React Query

Thinking in React Query

In this talk, we will learn how a different mindset can help us understand React Query and work with it efficiently.


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Jun 6, 2023
Breaking React Query's API on purpose

Breaking React Query's API on purpose

Why good API design matters, even if it means breaking existing APIs in the face of resistance.


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Apr 15, 2023
Speeding up pnpm

Speeding up pnpm

DefinitelyTyped contains over 8000 packages. What could go wrong?


Jake Bailey icon
Jake Bailey
jakebailey.dev
·
Mar 26, 2023

What is DefinitelyTyped, and is it a monorepo?

Yes, it is! Kinda.


Jake Bailey icon
Jake Bailey
jakebailey.dev
·
Mar 26, 2023
OSS Feature Decision Tree

OSS Feature Decision Tree

An outline of the questions I try to ask myself before adding new features


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Feb 17, 2023
Type-safe React Query

Type-safe React Query

About the difference between "having types" and "being type-safe"...


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Jan 6, 2023
Inside React Query

Inside React Query

Taking a look under the hood of React Query


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Dec 2, 2022
Seeding the Query Cache

Seeding the Query Cache

With suspense for data fetching on the horizon, it is now more important than ever to make sure your cache is seeded properly to avoid fetch waterfalls.


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Oct 21, 2022
Refs, Events and Escape Hatches

Refs, Events and Escape Hatches

Refs can provide a way to sidestep dependency arrays without violating any rules, and the proposed useEvent hook might make working with functions and effects a lot easier...


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Sep 16, 2022
React Query meets React Router

React Query meets React Router

React Query and React Router are a match made in heaven.


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Aug 27, 2022
Avoiding useEffect with callback refs

Avoiding useEffect with callback refs

Interacting with DOM nodes doesn't necessarily need useEffect


TkDodo's blog icon
TkDodo's blog
tkdodo.eu
·
Aug 13, 2022