Show HN: Snapstate — a class-based React state manager to get logic out of useEffect

What happened
It has been reported that a developer released Snapstate, a TypeScript-first state manager that moves business logic out of React components and into plain classes. The pitch is simple: React does rendering; put application rules, async flows, and derived values in testable class-based stores instead of stuffing them into useEffect, custom hooks, or tangled useMemo chains. The author argues this yields stores you can test without React, components that only render, and a clearer boundary between UI and application logic.
What it does (and why)
Snapstate aims for a middle ground between heavy, boilerplate-heavy systems like Redux and lighter, hook-centric tools such as Zustand. It allegedly keeps the explicitness and class orientation of MobX but without the magic of implicit proxy tracking. The blog post includes a familiar example — a dashboard whose data fetching and derived values have migrated from an effect and local state into plain class methods — and frames Snapstate as an attempt to make application flows read like ordinary imperative TypeScript rather than React choreography. Who can blame anyone tired of debugging dependency arrays?
Why it matters
For teams wrestling with testability, reuse, and the slow creep of business logic into presentation layers, Snapstate is pitched as a breath of fresh air. It’s not a silver bullet — adopting class-based stores changes the architecture and mental model — but for developers fed up with hooking every service to a render cycle, this is a deliberate alternative worth trying. If nothing else, it spotlights a broader trend: people want clearer boundaries between UI and application logic. Snapstate is one more tool in that conversation.
Sources: thales.me, Hacker News
Comments