finds.dev← search

// the find

BendingSpoons/katana-swift

★ 2,231 · Swift · MIT · updated Nov 2022

Swift Apps in a Swoosh! A modern framework for creating iOS apps, inspired by Redux.

Katana is a Redux-style state container for Swift/iOS: a single immutable State struct, StateUpdater structs as the only way to mutate it, and a SideEffect protocol (built on Hydra promises) for async work. It's for iOS teams who want Redux's discipline without pulling in a JS-ecosystem mental model, written and open-sourced by Bending Spoons after using it in production apps with millions of downloads.

The core loop is genuinely clean: StateUpdater.updateState is a pure function with no side effects, so state transitions are trivially testable and there's no ordering ambiguity. Dependency injection via SideEffectDependencyContainer forces side effects to go through an injected container instead of singletons, which makes them mockable in tests. The Signpost/Instruments integration is a real operational feature, not just a demo screenshot — you can see dispatch timing and parallelism directly in Instruments. The interceptor system (DispatchableLogger, ObserverInterceptor) gives you logging and reactive triggers without touching the store internals.

The README itself says Bending Spoons has migrated their own apps off Katana/Tempura to swift-composable-architecture — the creators stopped using it, and the repo has had no commits since November 2022. The UI story is a dead end two ways: Katana-UI (the React-for-UIKit layer) was abandoned by its own authors for fighting UIKit's imperative nature, and the recommended replacement, Tempura, is a separate repo you'd need to vet independently for the same abandonment risk. There's no SwiftUI or native async/await story — side effects go through Hydra's promise/await shim instead of Swift concurrency, which is an odd fit for anything started today. Minimum requirements (iOS 11, Swift 5.0) are stale, and test coverage is thin for a state-management library — five test files covering the whole dispatch/interceptor/side-effect surface.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →