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 under the rules and on the dates stated below: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

This page compares the source lines of code (SLOC) of reduxjs/redux and pmndrs/zustand using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.

As of 2026-11-14, reduxjs/redux contains 218,030 total lines (211,558 code) across 195 files, while pmndrs/zustand contains 9,230 total lines (7,318 code) across 56 files as of 2026-11-06. reduxjs/redux has about 29x the counted code lines of pmndrs/zustand under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.

Metricreduxjs/reduxpmndrs/zustand
Files19556
Total lines218,0309,230
Code lines211,5587,318
Comment lines1,591388
Blank lines4,8811,524
Languages counted1111

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: YAML (57.7% of code), TypeScript (20.7% of code), JSX (6.1% of code). YAML, TypeScript, JavaScript appear in both top language lists; JSON, TSX appear only in reduxjs/redux's top languages; JSX, CSS appear 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 39bd88011b0c) on 2026-11-14; pmndrs/zustand was counted at ref main (commit 9fed2eb2f3af) on 2026-11-06. See the counting methodology for ignored directories and analysis options.

Both reports use the same engine and effective counting rules. Repository declarations, when enabled, are specific to each repository. reduxjs/redux: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed. pmndrs/zustand: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.

About this comparison

Background observations recorded on 2026-09-16; language descriptions here are historical context, not claims about the current filtered shares. Use this page's measured language breakdown for current counts. Repository layout before counting filters: reduxjs/redux is the Redux core repository — the state container library, its documentation, and tests. pmndrs/zustand is 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 repositories 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.

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 · pmndrs/zustand repository. Statements verified 2026-09-16.

Evidence and next steps:

Saved reports remain subject to cache cleanup and replacement. Export their JSON for durable citation; live report URLs can change.

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?

As of 2026-11-14, reduxjs/redux contains 218,030 total lines (211,558 code) across 195 files, while pmndrs/zustand contains 9,230 total lines (7,318 code) across 56 files as of 2026-11-06. reduxjs/redux has about 29x the counted code lines of pmndrs/zustand under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.

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 39bd88011b0c) on 2026-11-14; pmndrs/zustand was counted at ref main (commit 9fed2eb2f3af) on 2026-11-06. 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.