finds.dev

eduardomoroni/react-clean-architecture

A realistic approach to implement clean architecture on react codebases

View on GitHub

★ 1,620TypeScriptupdated Sep 2023

// the take

A reference implementation of Clean Architecture in a React/React Native codebase, built around two toy apps (a counter and an auth flow) that split logic into entities, use cases, adapters, and presenters. It's aimed at developers wanting a concrete example of isolating business rules from React/Redux rather than just reading about the pattern in the abstract.

The core/web/native split is a genuinely useful demonstration of sharing business logic (entities, use cases) between a React web app and a React Native app from the same package. The dependency rule (inner layers can't import outer ones, no framework imports in entities/use cases) is consistently applied across both sample apps, not just described. Having two examples of increasing complexity (sync-only counter, then an async auth flow with validation and persistence) makes the pattern easier to map onto a real feature.

The author states outright in the README that this is an example, not what they'd actually ship, and that it's outdated with conventions that have since changed — that's not false modesty, the tooling backs it up: last push is from September 2023, it uses tslint (deprecated years ago in favor of eslint), old-style React Native with Buck/Gradle Android scaffolding, and class-component-era patterns. There are no tests anywhere in the tree despite 'testability' being clean architecture's main selling point. The amount of indirection (entity → interactor → adapter → presenter → component) for something as trivial as a counter is a real cost signal: teams adopting this literally need to weigh whether the layering pays for itself on their actual feature complexity, and the repo doesn't help with that judgment call.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
1,620
Forks
185
Language
TypeScript
Last commit
23 Sep 2023

// nearby

If react-clean-architecture isn't quite it.

All repos →