Next.js vs React Router: source lines of code compared

The Next.js vs React Router comparison on OctoCounts shows side-by-side source line counts for vercel/next.js and remix-run/react-router, 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 vercel/next.js and remix-run/react-router 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-16, vercel/next.js contains 1,001,292 total lines (810,912 code) across 8,670 files, while remix-run/react-router contains 157,353 total lines (112,010 code) across 705 files as of 2026-11-13. vercel/next.js has about 7.2x the counted code lines of remix-run/react-router 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.

Metricvercel/next.jsremix-run/react-router
Files8,670705
Total lines1,001,292157,353
Code lines810,912112,010
Comment lines92,89425,765
Blank lines97,48619,578
Languages counted2912

Top languages in vercel/next.js: Rust (35.7% of code), TypeScript (30.4% of code), TSX (10.8% of code). Top languages in remix-run/react-router: TypeScript (73.3% of code), YAML (13.6% of code), TSX (9.6% of code). TypeScript, TSX, JSON, JavaScript appear in both top language lists; Rust appears only in vercel/next.js's top languages; YAML appears only in remix-run/react-router's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. vercel/next.js was counted at ref canary (commit a19c4f99adc8) on 2026-11-16; remix-run/react-router was counted at ref main (commit 5d7962ea44fe) on 2026-11-13. 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. vercel/next.js: 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. remix-run/react-router: 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: vercel/next.js is the Next.js monorepo — framework packages, documentation site, examples, and test suites. remix-run/react-router is the React Router repository: the routing library packages, docs, and tests. This is a framework-repository vs library-repository comparison: related layers of the same stack, but not the same kind of software, counted on the dates shown in the methodology line above.

This is not framework-vs-framework: React Router supplies routing and is typically paired with a separate data and build layer, while Next.js bundles those concerns. Neither number indicates which fits an application better.

Sources: vercel/next.js repository structure (monorepo with examples and docs) · remix-run/react-router 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, vercel/next.js or remix-run/react-router?

As of 2026-11-16, vercel/next.js contains 1,001,292 total lines (810,912 code) across 8,670 files, while remix-run/react-router contains 157,353 total lines (112,010 code) across 705 files as of 2026-11-13. vercel/next.js has about 7.2x the counted code lines of remix-run/react-router 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 vercel/next.js, remix-run/react-router, or any repository.

How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. vercel/next.js was counted at ref canary (commit a19c4f99adc8) on 2026-11-16; remix-run/react-router was counted at ref main (commit 5d7962ea44fe) on 2026-11-13. 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.