AI summary by TwinMind
Why Tech Companies Are Moving Off React
Theo - t3․gg
1h 28m 32s
Introduction and Article Overview
- Theo reacts to Medium article claiming Silicon Valley CTOs secretly moving away from React
- Article behind paywall, so Theo will skip sections to avoid creating market alternative
- Initial skepticism about article's claims and reasoning
Defense of React's Major Architectural Changes
Hooks (2018)
- Hooks revolutionized state management in React applications
- Before hooks: Complex patterns like Higher Order Components (HOCs) and render props
- HOCs required wrapping components to pass state as props
- Render props created nested callback hell with poor composability
- State reuse was extremely difficult and verbose
- With hooks: Simple, composable state management
useContextreplaces complex wrapper patterns- Custom hooks enable easy state reuse across components
- GraphQL example:
const {loading, error, data} = useQuery(GET_USERS)
- Impact on developers: Made state accessible to more developers, but increased total state usage
- Previously only senior devs could add reusable state due to complexity barriers
- Now junior devs can add state easily, leading to more decisions (good and bad)
- Analogy: Cars vs horses - more accidents total, but safer per mile traveled
Concurrent Mode
- Problem solved: Sticky keys issue where user input blocked during React renders
- Solution: Cooperative multitasking allowing React to pause renders for user interactions
- Implementation: React can start rendering, pause for higher priority tasks, then resume
- Results: Massive performance improvements for large applications
- Deployment: Seamless upgrade for most React apps without code changes
Server Components
- Core concept: Components that run exclusively on server, sending HTML instead of JSON
- Solves server-driven UI problems:
- Traditional SPAs require client-side code for every possible server state
- Version drift issues between client and server capabilities
- Large bundle sizes from including all possible UI states
- Real-world precedent: Facebook's Project Lightseed used SQLite for dynamic UI templates in Messenger
- Benefits for large companies:
- Reduced client bundle sizes
- Eliminated version drift problems
- Smaller data payloads (markup often smaller than over-fetched JSON)
- Less client-side logic to maintain
- Target audience: Primarily benefits large companies with complex feeds/applications
React Compiler
- Performance results at Meta:
- Instagram and Quest Store saw 2x faster interactions
- 12% improvement in load/navigation times
- 3-4% average improvement across all routes
- Context: These improvements on already heavily hand-optimized codebases
- Benefit: Eliminates need for manual memoization (useMemo, useCallback)
- Primary beneficiaries: Large companies with complex applications
Critique of Article's Performance Arguments
- "Performance ceiling" claim: Comparing React web apps to native apps is unfair comparison
- React achieving 60% of native app complexity is impressive, not limiting
- Browser inherently has more performance restrictions than native
- Memory issues: Problem is developer knowledge of browser performance tools, not React
- Mobile performance: Issues stem from large JS payloads and API waterfalls
- Server components directly address these problems
- Moving off React won't solve underlying architectural issues
Response to "Growing Metaframework Problem"
- Claimed 67% time spent on React-specific patterns: Disputed with T3 Chat codebase examples
- Analysis of recent T3 Chat PRs: Most changes were business logic, minimal React-specific code
- Comparison to 2016 React: Modern React with hooks is significantly more productive
- Developer responsibility: Problem is engineers over-engineering solutions, not React complexity
Framework Churn Analysis
- Class to Function Components (2018): 6 years old, fully interoperable, no forced migration
- State Management Evolution:
- Redux → Context API → Modern solutions (Zustand, Jotai)
- All solutions can coexist in same codebase
- React Query (used since 2018) provides stable state management
- Build Tools: "Migrating" from CRA → Next → Remix → Vite is cherry-picked example
- Most are different categories (template vs framework vs bundler)
- CRA to Next migration typically easy unless heavily customized
- Rendering Strategies: CSR → SSR → Server Components are additive, not replacements
Talent and Onboarding Crisis Response
- "Skilled React devs are rare": Moving off React makes talent pool smaller, not larger
- Onboarding time increase (2018: 2 weeks → 2022: 2-3 months):
- Caused by application complexity growth, not React complexity
- Codebase naturally becomes harder as it grows and adds features
- Complexity over time: Tools made building complex apps easier, so average app complexity increased
- User expectations: Higher standards for web applications compared to early 2000s
Dependency Security Concerns
- 1,500-2,000 npm dependencies claim: Not React-specific problem
- Solution approaches:
- Copy-paste simple utilities instead of installing packages
- Use component libraries like Shadcn that provide code, not packages
- Radix UI consolidating into single package with tree-shaking
- Philosophy: Either dependency is simple (copy it) or complex (be grateful you don't maintain it)
Alternative Approaches Critique
- Island Architecture: Increases complexity and dependencies, doesn't solve stated problems
- Custom UI Framework:
- "20% size of React" - React bundle size (~130KB) is negligible in real applications
- T3 Chat loads 3.6-4MB total JS, React size reduction meaningless
- Custom framework increases maintenance burden without meaningful benefits
Personal Development Philosophy
- Simplicity scales: Focus on keeping individual pieces simple as codebase grows
- Tool selection: Use proven, stable libraries (example: Dexie from 2014 for T3 Chat state)
- Avoid bleeding edge: Don't feel pressure to use newest technologies
- Education over framework switching: Developer knowledge gaps are real problem, not React
Conclusion
- Article's arguments largely unfounded or misdirected
- React's recent developments specifically target large-scale application problems
- Moving off React won't solve underlying architectural or developer skill issues
- Focus should be on education and proper architectural practices, not framework switching
