# Redux vs Zustand: source lines of code compared

The Redux vs Zustand comparison on OctoCounts shows side-by-side source line counts for reduxjs/redux and pmndrs/zustand, counted with the same engine and analysis options on the dates shown in the methodology line: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

As of 2026-09-30, reduxjs/redux contains 218,028 total lines (211,558 code) across 195 files, while pmndrs/zustand contains 18,218 total lines (16,291 code) across 57 files as of 2026-09-29. reduxjs/redux is about 13x the size of pmndrs/zustand by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [reduxjs/redux](https://octocounts.com/github/reduxjs/redux) | [pmndrs/zustand](https://octocounts.com/github/pmndrs/zustand) |
| --- | ---: | ---: |
| Files | 195 | 57 |
| Total lines | 218,028 | 18,218 |
| Code lines | 211,558 | 16,291 |
| Comment lines | 1,590 | 374 |
| Blank lines | 4,880 | 1,553 |
| Languages counted | 11 | 11 |

Top languages in reduxjs/redux: JSON (89.5% of code), YAML (7.3% of code), TypeScript (1.4% of code). Top languages in pmndrs/zustand: JSON (57.6% of code), YAML (27.1% of code), TypeScript (7.7% of code). JSON, YAML, TypeScript, JavaScript appear in both top language lists; TSX appears only in reduxjs/redux's top languages; JSX appears only in pmndrs/zustand's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. reduxjs/redux was counted at ref master (commit 56abca474992) on 2026-09-30; pmndrs/zustand was counted at ref d7a5583cffd80af515f7dfb69583c95cbdc9e2ce (commit d7a5583cffd8) on 2026-09-29. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
## About this comparison

reduxjs/redux counts the Redux core repository — the state container library, its documentation, and tests. pmndrs/zustand counts the Zustand repository — the small state management library, its middleware, docs, and tests. Both are client-side state management libraries rather than frameworks, which makes the two counts broadly comparable as library source trees.

Both counted trees are small relative to framework repositories, which is visible directly in the totals: each library implements one focused responsibility — predictable state updates for Redux, minimal hook-based state for Zustand — rather than a full stack.

In both reports, a visible share of the lines exists for documentation and tests rather than shipped runtime code, a pattern the per-language tables and totals show for small, API-documented libraries.

_Smaller does not mean sufficient or insufficient for your use case: the counts say nothing about which state model fits an application — that depends on the app's data flow, team conventions, and ecosystem integrations._

Sources: [reduxjs/redux repository](https://github.com/reduxjs/redux) · [pmndrs/zustand repository](https://github.com/pmndrs/zustand). Statements verified 2026-09-16.

Evidence and next steps:

- [reduxjs/redux SLOC report](https://octocounts.com/github/reduxjs/redux)
- [pmndrs/zustand SLOC report](https://octocounts.com/github/pmndrs/zustand)
- [Compare reduxjs/redux and pmndrs/zustand interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2Freduxjs%2Fredux&right=https%3A%2F%2Fgithub.com%2Fpmndrs%2Fzustand)

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

## Compare FAQ

### Which has more lines of code, reduxjs/redux or pmndrs/zustand?

reduxjs/redux has more code: 211,558 code lines versus 16,291 for pmndrs/zustand, about 13x as much, based on cached OctoCounts reports as of 2026-09-30.

### Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for reduxjs/redux, pmndrs/zustand, or any repository.

### How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. reduxjs/redux was counted at ref master (commit 56abca474992) on 2026-09-30; pmndrs/zustand was counted at ref d7a5583cffd80af515f7dfb69583c95cbdc9e2ce (commit d7a5583cffd8) on 2026-09-29. See the counting methodology for ignored directories and analysis options.

### Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.

## Related OctoCounts pages

- [Interactive repository comparison](https://octocounts.com/compare)
- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [OctoCounts API docs](https://octocounts.com/docs/api)
