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 Route | Most other libraries | |
|---|---|---|
| Typing | Full (except beforeEnter / beforeLeave) | Partial (because due to dynamic declarations and nesting, TS does not know the actual route tree) |
| Reactivity | Any with Proxy | Only for one library / absent |
| Framework | Any | One, with rare exceptions - adapters for similar frameworks (React + Solid.js) |
| Lifecycle | Async | Sync |
| Parameter validation | Required | Optional / absent |
| SSR | Simple setup | Complex setup |
| DX convenience | Fast navigation, simple auto-refactoring, clean structure | The full structure exists only at runtime, manual redirect control by strings |
| File structure | Any | Limited in a file-based approach |
| Code splitting | Native (for page components and other exports) | Partial / via specific utilities |
| Ready-made components | Router only | Present |
| Dev tools | No (but active State is easy to log) | Present |
| Nested configs | No | Yes |
| Wildcards | No | Yes |
| Dynamic routes | No | Yes |
| Optional path parts | No | Yes |
| File-based | No | Yes |
| Hash and URL state support | No | Partial |
| Type conversion for params and query | No | Partial |