AI summary by TwinMind

Flaws of the T3 Stack

Theo - t3․gg

37m 39s

Introduction and Stack Overview

  • Creator of T3 stack discussing worst parts/limitations (not good parts today)
  • Stack includes: Prisma, Next.js, React, Vercel, Tailwind, NextAuth, tRPC
  • Acknowledges good parts: full stack type safety, great scalability, horizontal scaling, good standards, hot swap ability, bleeding edge responsibly
  • Warning: don't use for blogs

Prisma Limitations

  • Edge Runtime Issues: slow on edge, gigantic bundle size, includes rust binary that won't run on edge
  • Performance: rough cold starts in serverless environments, not fastest for heavy/nested queries
  • Node Modules: very opinionated, overrides node modules as npm install post install step to create types
  • Code Generation: barrier compared to tRPC (no type gen needed), requires generating types to use properly
  • General: not the fastest query resolution, especially with big heavy queries

tRPC Limitations

  • Scope Limitations: sucks outside TS mono repos, don't use for third-party APIs
  • Coupling: tightly couples backend to frontend (creator considers this compliment, not insult)
  • Performance: TS dev performance limiting with lots of endpoints (couple hundred queries/mutations slow down TS server, V10 improved to few thousand)
  • Client Support: support for non-JS clients inconsistent, React bindings most mature (wrapping React Query)
  • Language Support: limited to TS environments

Tailwind Limitations

  • Build Process: needs to parse all files that might use Tailwind classes, can get rough for big codebases
  • CSS Knowledge: requires learning CSS (creator considers positive, others don't)
  • Code Splitting: no real code splitting - all CSS goes to one file for whole app, not per-page optimization
  • Bundle Size: individual pages won't have minimal CSS, but total app CSS will be small
  • Styling Approach: some consider inlining messy (creator disagrees)

NextAuth Limitations

  • Philosophy: too generic but also too specific, tries to solve all use cases rather than prescribing best practices
  • User Management: no user ID by default, getting user ID is annoying
  • JWT Support: half-baked JWT implementation
  • TypeScript: requires many type overrides for proper usage
  • Edge Runtime: buggy at best, creator hasn't gotten it working
  • Session Management: useSession doesn't have meaningful states, rough data flow control
  • Server Integration: requires getServerSideProps with session fetching, complex page props pass-through
  • Token Management: no easy way to refresh tokens, not really implemented
  • Platform Support: React Native support not there yet, non-React support even further behind
  • Learning Curve: need to know a lot about NextAuth to use effectively

Next.js Limitations

  • Bundle Size: ships a lot of JS, can't ship very small bundles
  • Routing: mostly locked into file-based routing, bringing own router difficult with SSR
  • Build System: locked into their builder (webpack/SWC), can't use Vite or Bun realistically
  • React Dependency: React pretty mandatory, difficult to use without React
  • Data Loading: patterns are "trash" and dated, getServerSideProps very dated
  • Edge Support: really early, breaks in unexpected ways, not recommended yet
  • Data Flow: unintuitive and limited, page props particularly problematic
  • Imports: most Next imports "cursed", even head component problematic
  • Router Issues: useRouter sucks at query params (undefined on first render)
  • Use Case: not best for static sites, better for dynamic applications

React Limitations

  • Static Sites: not good for static content, loads entire DOM into virtual DOM unnecessarily
  • Prescriptive Nature: doesn't prescribe data, styles, routing - can be problem for some teams
  • Solution Space: absurdly large variety in problem-solving approaches, inconsistent for teams wanting uniformity
  • Documentation: new docs incredible but not localized yet, non-English support lagging behind
  • Agency vs Consistency: gives developers lots of agency, but some teams prefer more consistency (like Angular)

Vercel Limitations

  • Stateless: entirely stateless, need external database/caching solutions
  • Serverless: cold starts if not using edge, Lambda vs Edge almost different products
  • Multi-region: rough for pro users, only available in Enterprise plan for non-edge
  • Edge Support: still early stage
  • Framework Support: Next.js happiest path, other frameworks less supported
  • Pricing: can scale weird for some features (image optimization, invocations)
  • WebSockets: can't do websockets (implicit in serverless)

T3 Stack Opinions with Rough Edges

  • Modularity: lot of flexibility between parts, developers can make poor decisions
  • Learning Curve: lot of pieces to learn (tRPC implies React Query, Next.js implies server rendering, etc.)
  • Developer Agency: assumes developers good enough to work around assumptions and make good decisions
  • Testing: no prescribed testing solution, developers might pick poorly
  • Not Rails Killer: not trying to build Rails replacement, don't care enough about testing to build it in

SSR and Data Loading Philosophy

  • No First Paint Data: don't fetch data on first paint by default
  • Loading States: show loading states rather than blocking server response
  • Type Safety: using getServerSideProps loses type safety with tRPC
  • SPA Plus Plus: single page app with good loading paths, data fetching, behaviors
  • Cold Start Performance: blocking data from server to client on cold start is rough experience
  • SEO Considerations: HTML coming down wire not fully correct with all data, potential SEO issues

TypeScript and Type Safety Issues

  • Database Type Safety: databases might not be type safe, need to write "lies" somewhere
  • Performance: TS dev performance issues with large codebases (tens of thousands of files)
  • Runtime Performance: JavaScript runtime performance not optimal (though horizontally scalable)
  • Editor Performance: might slow down editor due to type inference work

Documentation and Learning

  • Minimal Docs: intentionally minimal documentation, defer to individual component docs
  • Learning Curve: depends heavily on existing knowledge of stack components
  • Stack vs Framework: not their responsibility to over-document since it's a stack, not framework
  • Version Changes: heavy documentation would become outdated with component updates (e.g., tRPC V10)

Use Case Recommendations

  • Not for Every Project: creator using it less recently due to more static work
  • Best for Apps: ideal for data-changing applications where users keep pages open for minutes/hours
  • Not for Blogs: repeatedly emphasizes not for blogs or mostly static content
  • Fastest Full Stack: believes it's fastest way to build and scale full stack solutions
  • Team Considerations: teams should evaluate limitations against their specific needs

TwinMind

Get summaries like this for your own meetings

TwinMind takes notes in the background during meetings, lectures, and calls, then writes the summary for you.

Free plan to get started

No bot joins your calls

Phone, desktop & Chrome apps

Your next meeting, summarized like this

TwinMind listens in the background and turns meetings, lectures, and calls into searchable notes you can chat with. Start free.

Available on phone, desktop & Chrome

Your next meeting, summarized like this

TwinMind listens in the background and turns meetings, lectures, and calls into searchable notes you can chat with. Start free.

Available on phone, desktop & Chrome

Your next meeting, summarized like this

TwinMind listens in the background and turns meetings, lectures, and calls into searchable notes you can chat with. Start free.

Available on phone, desktop & Chrome