Gathering detailed insights and metrics for @generouted/tanstack-react-router
Gathering detailed insights and metrics for @generouted/tanstack-react-router
Generated file-based routes for Vite
npm install @generouted/tanstack-react-router
Typescript
Module System
Node Version
NPM Version
54.9
Supply Chain
86.2
Quality
90.6
Maintenance
50
Vulnerability
98.6
License
TypeScript (97.56%)
JavaScript (1.69%)
HTML (0.66%)
CSS (0.09%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
22,940
Last Day
58
Last Week
366
Last Month
1,964
Last Year
8,491
MIT License
1,120 Stars
435 Commits
60 Forks
8 Watchers
10 Branches
23 Contributors
Updated on Feb 13, 2025
Latest Version
1.20.0
Package Id
@generouted/tanstack-react-router@1.20.0
Unpacked Size
16.18 kB
Size
5.34 kB
File Count
6
NPM Version
10.9.2
Node Version
23.7.0
Published on
Feb 07, 2025
Cumulative downloads
Total Downloads
Last Day
-43.7%
58
Compared to previous day
Last Week
-35.3%
366
Compared to previous week
Last Month
155.7%
1,964
Compared to previous month
Last Year
-31.7%
8,491
Compared to previous year
This integration is based on a Vite plugin to generate routes config for TanStack React Router with generouted
conventions. The output is saved at src/routes.gen.tsx
and gets updated by the add/change/delete at src/pages/*
.
In case you don't have a Vite project with React and TypeScript, check Vite documentation to start a new project.
1pnpm add @generouted/tanstack-react-router @tanstack/router@beta
Optional additional packages for actions and/or loaders:
1pnpm add @tanstack/react-actions@beta @tanstack/react-loaders@beta
Optionally install prettier
as a dev dependency so generouted
formats the generated src/routes.gen.tsx
file automatically:
1pnpm add --save-dev prettier
1// vite.config.ts 2 3import { defineConfig } from 'vite' 4import react from '@vitejs/plugin-react' 5import generouted from '@generouted/tanstack-react-router' 6 7export default defineConfig({ plugins: [react(), generouted()] })
1// src/main.tsx 2 3import { createRoot } from 'react-dom/client' 4import { Routes } from './routes.gen' 5 6createRoot(document.getElementById('root')!).render(<Routes />)
Add the home page by creating a new file src/pages/index.tsx
→ /
, then export a default component:
1// src/pages/index.tsx 2 3export default function Home() { 4 return <h1>Home</h1> 5}
pages/_app.tsx
1// src/pages/_app.tsx 2 3import { Outlet } from '@tanstack/router' 4 5export default function App() { 6 return ( 7 <section> 8 <header> 9 <nav>...</nav> 10 </header> 11 12 <main> 13 <Outlet /> 14 </main> 15 </section> 16 ) 17}
MIT
No vulnerabilities found.
No security vulnerabilities found.