Skip to content

Comparison

Minified / + Brotli
reactive-routev1.0.05.27 KB/ 2.11 KB
mobx-routerv1.0.0x3.725.71 KB/ 7.87 KB
@solidjs/routerv0.15.4x4.023.40 KB/ 8.54 KB
@kitbag/routerv0.22.0x14.4112.16 KB/ 30.45 KB
vue-routerv5.0.0x19.1137.26 KB/ 40.34 KB
@tanstack/react-routerv1.157.15x19.4151.71 KB/ 40.93 KB
react-routerv7.13.0x24.4184.46 KB/ 51.49 KB

Configuration

esbuild is used with minification and with the participating libraries' peerDependencies excluded. With tree shaking enabled in real projects, sizes may be smaller.

ts
esbuild.build({
  minify: true,
  target: 'chrome140',
  packages: 'bundle',
  external: ['react', 'mobx', 'mobx-react-lite', 'vue', 'zod', 'react-dom'],
  treeShaking: false,
});
Input files
ts
import * as a from 'reactive-route';
import * as b from 'reactive-route/adapters/mobx-react';
import * as c from 'reactive-route/react';

a;
b;
c;
ts
import * as a from 'mobx-router';

a;
ts
import * as a from 'vue-router';

a;
ts
import * as a from '@kitbag/router';

a;
ts
import * as a from '@tanstack/react-router';

a;
ts
import * as a from 'react-router';

a;
ts
import * as a from '@solidjs/router';

a;

Features

Reactive RouteMost other libraries
TypingFull (except beforeEnter / beforeLeave)Partial (because due to dynamic declarations and nesting, TS does not know the actual route tree)
ReactivityAny with ProxyOnly for one library / absent
FrameworkAnyOne, with rare exceptions - adapters for similar frameworks (React + Solid.js)
LifecycleAsyncSync
Parameter validationRequiredOptional / absent
SSRSimple setupComplex setup
DX convenienceFast navigation, simple auto-refactoring, clean structureThe full structure exists only at runtime, manual redirect control by strings
File structureAnyLimited in a file-based approach
Code splittingNative (for page components and other exports)Partial / via specific utilities
Ready-made componentsRouter onlyPresent
Dev toolsNo (but active State is easy to log)Present
Nested configsNoYes
WildcardsNoYes
Dynamic routesNoYes
Optional path partsNoYes
File-basedNoYes
Hash and URL state supportNoPartial
Type conversion for params and queryNoPartial

No AI participated in the development. MIT License