Based on analysis of GitHub issues, existing documentation, repository structure, and common developer pain points, here are the top 10 how-to guides that would most increase developer and AI productivity:
Status: ✅ Complete - Available at docs/router/framework/react/how-to/deploy-to-production.md
Priority: Critical - Major feature with complex setup
Key Pain Points:
- React import errors in SSR (Issue #3159)
- SSR compatibility with different frameworks
- Bun runtime SSR issues (Issue #2180)
Content Should Cover:
- Setting up SSR with Vite
- Configuring entry-client.tsx and entry-server.tsx
- Handling hydration mismatches
- SSR with different deployment targets (Node.js, Bun, Edge)
- Server context setup and data loading
Priority: High - Large user base needs migration path
Key Pain Points:
- API differences between routers
- Breaking changes in routing patterns
- Component refactoring requirements
Content Should Cover:
- Step-by-step migration checklist
- Converting Route components to file-based routing
- Updating Link and Navigate usage
- Search params migration
- Loader/action pattern conversions
- Common gotchas and troubleshooting
Priority: High - Blocking developer productivity
Key Pain Points:
- Webpack/Vite plugin configuration
- Type generation failures
- Build optimization problems
- Module resolution errors
Content Should Cover:
- Plugin setup for different bundlers (Vite, Webpack, ESBuild, Rspack)
- Fixing TypeScript route generation
- Resolving import/export errors
- Optimizing bundle size
- Development vs production build differences
Priority: High - Common integration challenges
Key Pain Points:
- Shadcn/ui animation conflicts (Issue #939)
- CSS-in-JS library compatibility
- Animation framework integration
Content Should Cover:
- Shadcn/ui integration and animation fixes
- Material-UI/MUI setup
- Chakra UI integration
- Framer Motion compatibility
- CSS modules and styled-components
Priority: High - Security-critical feature
Key Pain Points:
- Auth state management
- Route protection patterns
- Login redirects and state persistence
Content Should Cover:
- Setting up route context for auth
- Creating auth-protected route patterns
- Implementing login redirects
- Handling auth state persistence
- Integration with popular auth providers (Auth0, Clerk, Supabase)
Priority: High - Improves developer experience
Key Pain Points:
- Route matching problems
- Type errors with parameters
- Navigation not working as expected
- Performance debugging
Content Should Cover:
- Using TanStack Router DevTools effectively
- Debugging route matching failures
- Troubleshooting navigation issues
- Performance profiling and optimization
- Common error patterns and solutions
Priority: Medium-High - Critical for production apps
Key Pain Points:
- Mocking router context in tests
- Testing navigation behavior
- Integration test setup
Content Should Cover:
- Unit testing components with router
- Mocking navigation and router state
- E2E testing with router navigation
- Testing search params and route data
- Jest/Vitest configuration for router
Priority: Medium-High - Onboarding efficiency
Key Pain Points:
- Initial project setup complexity
- TypeScript configuration
- Development workflow optimization
Content Should Cover:
- Setting up a new project from scratch
- Configuring TypeScript for optimal DX
- Setting up ESLint rules for router
- Development workflow best practices
- IDE configuration and extensions
Priority: Medium-High - Common developer confusion
Key Pain Points:
- Search param type safety confusion
- URL state synchronization issues
- Complex search param validation
- Performance issues with search param updates
Content Should Cover:
- Setting up type-safe search params
- Validation with Zod/Valibot adapters
- URL state management patterns
- Search param performance optimization
- Complex search param scenarios (arrays, objects)
Priority: Medium - Advanced use cases
Key Pain Points:
- Complex nested routing
- Dynamic route generation
- Route-based code splitting
- Search param validation
Content Should Cover:
- Nested route architectures
- Dynamic route generation patterns
- Advanced search param handling
- Code splitting strategies
- Route-based data loading patterns
- Start with a working example - Provide complete, copy-paste ready code
- Include common variations - Cover different frameworks (React/Solid), bundlers, etc.
- Add troubleshooting section - Address the most common issues
- Link to related guides - Create a connected documentation experience
- Include next steps - Point to related advanced topics
- Each guide should be scannable - use clear headings and bullet points
- Include minimal working examples that can be quickly copied
- Provide error message → solution mappings for common issues
- Use consistent patterns across guides for predictability
- Start with deployment guide (#1) - highest GitHub issue frequency
- Follow with SSR setup (#2) - complex but high-impact
- Migration guide (#3) - large user base need
- Continue in priority order based on issue frequency and impact
These guides would significantly reduce the most common support requests and improve both developer and AI assistant effectiveness when working with TanStack Router.