Show HN: Foldkit vs. React, the same pixel art editor implemented in both
The creator of Foldkit, a TypeScript framework built on Effect and inspired by the Elm Architecture, presents a side-by-side comparison of the same pixel art editor implemented in both React and Foldkit. The comparison covers state management, UI, async operations, side effects, application structure, and testing to highlight the development and maintenance experience in each architecture.
Background
- Foldkit is a new TypeScript framework built on Effect (a TypeScript library for handling side effects, errors, and concurrency in a functional way) and inspired by the Elm Architecture (a pattern where state updates flow through a single centralized "update" function).
- The Elm Architecture, originally from the Elm language, structures apps as a tight loop: Model (state) → View (UI) → Update (a pure function that returns new state and side effects). No mutable state or scattered event handlers.
- Effect is gaining popularity in the TypeScript ecosystem as a way to write reliable, testable code with built-in error handling, retries, and dependency injection — concepts borrowed from functional programming.
- This page compares two versions of the same pixel art editor — one in React (the dominant UI library) and one in Foldkit — to show what development feels like, not just benchmark numbers. The point is to illustrate architectural differences in state management, async operations, side effects, and testing.