# 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-16, reduxjs/redux contains 402,440 total lines (395,795 code) across 278 files, while pmndrs/zustand contains 18,216 total lines (16,291 code) across 57 files as of 2026-08-26. reduxjs/redux is about 24x 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 | 278 | 57 |
| Total lines | 402,440 | 18,216 |
| Code lines | 395,795 | 16,291 |
| Comment lines | 1,590 | 373 |
| Blank lines | 5,055 | 1,552 |
| Languages counted | 11 | 11 |

Top languages in reduxjs/redux: JSON (94.1% of code), YAML (3.7% of code), JavaScript (1.3% of code). Top languages in pmndrs/zustand: JSON (57.6% of code), YAML (27.1% of code), TypeScript (7.7% of code). JSON, YAML, JavaScript, TypeScript appear in both top language lists; CSS 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 20e11b18109af65b60a48ab514c45b4ae52e772b (commit 20e11b18109a) on 2026-09-16; pmndrs/zustand was counted at ref main (commit b57db4f86ef1) on 2026-08-26. 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: 395,795 code lines versus 16,291 for pmndrs/zustand, about 24x as much, based on cached OctoCounts reports as of 2026-09-16.

### 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 20e11b18109af65b60a48ab514c45b4ae52e772b (commit 20e11b18109a) on 2026-09-16; pmndrs/zustand was counted at ref main (commit b57db4f86ef1) on 2026-08-26. 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)
