Skip to main content
Juliano Alves
Back to blog
1 min read
Vitest mocking patterns that stay maintainable
vi.mock hoisting, partial mocks, timers, fetch stubs, and when to prefer integration tests over deep module mocks.
Testing
Vitest
TypeScript
2 min read
Infinite queries with TanStack Query
useInfiniteQuery, stable pageParam, flattening pages, bi-directional scroll, and cache invalidation when lists mutate.
React
TypeScript
Data fetching
1 min read
Drizzle ORM: TypeScript-first SQL
Schema as code, migrations, relations vs manual joins, SQL-like query builder, and comparing Drizzle to Prisma for control freaks.
TypeScript
PostgreSQL
ORM
1 min read
tRPC: end-to-end types without GraphQL
Procedures, routers, context, Zod input validation, React Query integration, and boundaries between BFF tRPC and public REST.
TypeScript
API
React
4 min read
TypeScript utility types I use every day
From Pick and Omit to satisfies, mapped types, and when to reach for conditional types—patterns for APIs, forms, and component libraries without drowning in generics.
TypeScript
Frontend
2 min read
Zustand for client state (and hydrating from the server)
When a small store beats Context, slices and middleware, persist middleware caveats, and passing initial state from RSC without duplicate fetches.
React
TypeScript
State management
3 min read
A type-safe client from OpenAPI
openapi-typescript for paths and operations, Orval for React Query hooks, runtime validation with Zod, and CI gates so generated code never drifts from production APIs.
TypeScript
API
DX
2 min read
Debugging Node and TypeScript in VS Code
launch.json recipes for Vitest and Jest, attaching to Nest/Express with --inspect, compound configs, env files, and source-map pitfalls in monorepos.
Node.js
TypeScript
DX

© 2026 Juliano Alves. All rights reserved.