AI summary by TwinMind
STREAM VOD: Lee Rob & Theo Chat The Future Of Next.js and The Web
Theo - t3․gg
1h 50m 50s
Introduction & Background
- Lee Robinson, VP Developer Experience at Vercel
- Helps educate communities on Vercel, Next.js, and frameworks
- Got into community by accident when Next.js had limited educational content
- Created blogs, videos, courses to fill content gap
- Joined Vercel team to do developer education full-time
Content Creation & Community Strategy
- Discussion of middle ground between YouTube tutorials and technical conference talks
- Lee's background: long-time YouTuber, made gaming videos (Halo), videography experience
- 2020 shift: people wanted fresh, approachable technical content online
- Vercel's strategy: individual developers use personal channels vs company channels
- People follow individuals, not companies - builds authentic relationships
- Vercel engineers/PMs tweet and share content personally rather than corporate accounts
- Investment in individual team members' personal brands and YouTube channels
- Example: Delba's unique content presentation style
YouTube & Thumbnail Strategy
- Product designers shouldn't design thumbnails - different goals
- Product design: seamless, cohesive, nothing unnecessary stands out
- Thumbnail design: stand out as much as possible for clicks
- Lee embraced "cringe" but effective thumbnails with faces
- Thumbnails are marketing for the video, not part of the product
- Goal: get people who would benefit from video to click
Next.js 13 Release Overview
- Two-part release: improvements to existing toolkit + glimpse into future
- Immediate improvements: better image component, font module system
- App directory: new direction for Next.js, not production-ready yet
- Year of public RFCs and discussions before implementation
- Create Next App now TypeScript-first by default
- Examples folder being updated to TypeScript-first
TypeScript Improvements
- Community feedback drove TypeScript-first approach
- Three main improvements:
- Ecosystem/tooling/examples teaching TypeScript-first
- Consistent data fetching patterns
- Better default tooling for right practices
- New TypeScript plugin provides automatic type inference
- No need to manually import/type Next.js-specific types
- Server components allow async/await without serialization issues
- Eliminates need for community packages like SuperJSON
Server Components & Mental Model Shift
- Server components feel similar to Astro - server-only until "use client"
- Mental model shift from Pages directory mixing server/client code
- Pages directory confusion: getServerSideProps runs server-side, component runs client-side
- App directory makes server/client boundary explicit with "use client"
- Beginners may find new model easier than existing patterns
- Educational materials crucial for adoption
Data Fetching & Caching
- Fetch cached by default - controversial but necessary for good defaults
- Most fetches should be static, framework should handle automatically
- People forget to set cache control headers
- ISR born from developers not using cache control properly
- Comparison to React Query's "important defaults" - aggressive caching forces learning
- Next option in fetch allows revalidate seconds and future tag-based invalidation
- Fine-grained cache control vs page-level invalidation
Missing Pieces & Future Development
- API routes not yet available in app directory
- Planning better version than current API routes
- Mutations/forms story not fully told yet
- Server components feel like mini-Astro apps within React
- Post-page-load updates challenging - no easy way to update server component data
- Need guidance on handling data mutations and real-time updates
Runtime Differences & Edge Computing
- Edge runtime vs Node.js runtime limitations
- Can't get URL path params on edge runtime in API directory
- Cold starts major performance bottleneck (400ms to 1.5+ seconds with Prisma)
- Edge runtime reduces cold starts to ~3ms
- Value of edge: warm starts vs cold starts, not just geographic proximity
- Database connection times major factor in performance
- HTTP-based database access (Planet Scale) much faster than traditional connections
Framework Architecture & Innovation
- Balance between providing primitives vs prescriptive solutions
- API routes example: community hacked catch-all routes for innovative solutions (tRPC, Next Auth)
- Webpack to SWC transition: embed common cases, maintain escape hatches
- Concern about innovation erosion with move to Rust tooling (SWC, Turbo Pack)
- Need JavaScript bridges for community plugin development
- Turbo Pack moving from Go to Rust for consistency
TypeScript & Library Maintenance Burden
- TypeScript benefits end users but increases burden on library maintainers
- Similar pattern with bundler consolidation potentially limiting innovation
- JSX 2.0 unlikely due to tooling complexity
- Community innovation drives framework adoption of best practices
- Balance between enabling innovation and providing good defaults
Documentation & Education Strategy
- Docs serve three audiences: reference, education, marketing
- Beta docs teach app directory first vs stable docs teaching Pages first
- Information architecture overhaul needed
- Comments enabled on Vercel deployment for community feedback
- Advanced Features section poorly organized - not all features actually advanced
- Custom app/document under "Advanced" but required for most apps
Edge Computing & Database Strategy
- Edge compute vs data persistence still confusing for developers
- Global replication slower and overkill for most applications
- Good caching often better than global data distribution
- Runtime separation from compute location important
- Cold start elimination more valuable than geographic proximity
- Automatic runtime selection based on code analysis (future possibility)
- Risk of accidental performance degradation from package installations
File-Based Routing & Type Safety
- Page.tsx naming allows co-location of components, styles, assets
- Type-safe routing exploration similar to TanStack Router
- File-based routing challenges with TypeScript - contracts outside JavaScript
- Layout data passing to nested components lacks type safety
- Need to manually maintain types across file boundaries
Community & Meta-Frameworks
- Healthy community innovation with T3 Stack, Markdoc, paid templates
- Community identifies framework gaps and creates solutions
- Successful patterns eventually influence core framework
- Examples: TypeScript adoption, Prisma integration
- React's primitive nature enables ecosystem innovation
- Next.js balance between primitives and opinions
Future Outlook
- Next.js binary distribution model (like Node.js)
- Fewer npm dependencies through vendor bundling
- Supply chain security through inlined dependencies
- Caching as next major buzzword after "edge"
- Vercel positioning as "internet cache company"
- Remote caching for Turbo Pack at module level
- SPA vs MPA: transitional apps taking best of both approaches
