Skip to main content

22 posts tagged with "react"

View All Tags

Type-Safe Firestore Paths in a Shared Package: Let the App Register Its Own Types

Β· 8 min read
Gergely Sipos
Frontend Architect

On the OTP project we are moving to a monorepo with several microfrontends. At least three apps talk to Firestore, and all of them had their own copies of the same hooks: subscribe to a document, subscribe to a query, wait for the current user. The obvious move is to pull those hooks into a shared @repo/react-firestore package.

The catch is typing. Each app owns its own Firestore schema: workspaces/{id}/projects, users/{id}/chats, and so on. The shared package must not know those paths. But if the hook just takes path: string, we lose the typo protection we had when each app typed its own hooks.

This post shows the pattern we used: the package declares an empty registry, each app fills it in through declaration merging, and the package's hooks derive their parameter types from whatever the app registered.

TanStack AI 1.0: Stable Core, 76 Packages, and an Experimental Agent Harness

Β· 16 min read
Gergely Sipos
Frontend Architect

TanStack AI 1.0 landed on npm on October 22, 2026, and the announcement post followed a day later. When we covered the beta in June, the pitch was the "Switzerland of AI tooling": any provider, any UI framework, the open AG-UI protocol on the wire, and no hosted platform attached. That pitch has not changed. What changed is the commitment behind it. The core APIs are now stable, 76 packages moved to 1.0 together, every API that 0.x had deprecated is gone, and a new agent harness ships beside the core as an explicitly experimental 0.x package. This post covers what "stable" includes, what landed between the August release candidate and 1.0, what an upgrade from 0.x costs, how the harness works, and what all of it means for Aliz projects.

One React, Four Outputs: DOM, PDF, Email, and Ink

Β· 15 min read
Gergely Sipos
Frontend Architect

An order has two units at $25 each. The browser editor shows $50. So do its downloadable invoice, confirmation email, and the terminal tool used by operations. Then someone changes the quantity to three. Every new representation should say $75β€”but updating a screen, producing a PDF, and sending another email are very different jobs.

React can participate in all four. That sounds like β€œwrite once, render anywhere,” until you ask what actually receives the component tree. A browser node? A document record? A string of HTML? A terminal frame?

The interesting part is not that several libraries accept JSX. It is where React's responsibilities stop and each destination's begin. We'll follow this hypothetical order across four outputs, separating shared business meaning from layout, input, and delivery. These are four output contracts, not four equivalent renderer implementations: email takes a different architectural branch.