AI summary by TwinMind
The State Of React (Survey)
Theo - t3․gg
26m 13s
Survey Introduction & Purpose
- State of React 2023 survey by Sacha and team (webdev surveyists)
- First ever comprehensive React community survey
- Goal: understand community sentiment on React's evolution, especially server components
- Survey covers React's 10-year journey from initial skepticism to current server components era
React APIs Usage & Experience
- Context: Built-in state manager, commonly used as globals (not ideal pattern), causes full app rerenders
- createPortal: Takes virtual DOM content, renders elsewhere in real DOM, useful for complex UI patterns
- forwardRef: "Utter chaos" - passes element references through multiple React layers, unintuitive API
- Fragment: Follows component return rule, avoids unnecessary DOM hierarchy
- lazy: Defers component loading until first render, guarantees client-side execution
- memo: Skips component rendering when props unchanged, effective but not optimal solution
- Profiler: Measures React tree rendering performance programmatically
- StrictMode: Causes effects to run twice, usually configured globally
Hooks Analysis
- useCallback: Stabilizes function definitions across rerenders when dependencies unchanged
- useContext: Accesses context values within components
- useDeferredValue: Renders old UI state during updates, integrates with Suspense for loading states
- useEffect: Left neutral - acknowledged complexity without detailed commentary
- useId: Tells React component values are same without manual keys, useful for server/client interactions
- useMemo: Caches calculation results between renders, mainly for object stability
- useReducer: Foundation for all React state management hooks, including useState
- useRef: Good API but problematic use cases, .current syntax awkward
- useState: Made React explanation much easier, highly positive
- useSyncExternalStore: Synchronizes external stores with React, used by libraries like Zustand and React Query
New React Features
- React Cache: Returns data fetch/computation results, unstable, unclear distinction from Next.js cache
- Server Components: Exclusively server-side components, highly positive experience
- Server Actions: Built-in server mutation solution, positive but wants more usage
- startTransition: Updates state without UI blocking, negative experience due to debugging complexity
- Suspense: Loading state management higher in DOM, powerful with server components and streaming
- use: Promise-based hook similar to React Query, negative experience due to constant reruns and server/client issues
- useFormState: Negative experience, lacks deterministic form relationship, requires client components
- useFormStatus: Similar issues to useFormState, non-deterministic component relationships
- useTransition: Neutral, feels primitive requiring manual UI management
Component Libraries
- Radix: Highly positive, provides accessibility and behavior without UI styling
- Headless UI: Similar to Radix, fine experience
- React Aria: Good experience, wants more usage, focuses on accessibility
- Shadcn UI: Absolutely positive
- MUI: Not preferred anymore
- Ant Design: Not interested
Animation Libraries
- Framer Motion: Good experience
- React Spring: Really good experience
- Auto-animate: "If it solves your problem is so nice"
- React Native Reanimated: Groundbreaking
Data Visualization
- D3: Too primitive for most use cases
- Recharts: Liked experience
- Victory: Weird experience
- Vizx: Didn't like
CSS-in-JS & Styling
- Tailwind: Highly positive
- Styled Components: "Best we can do at the time"
- Emotion: No strong stance
- Vanilla Extract: Important philosophy, likes approach
- CSS-in-JS on server: Bit rough
State Management
- Zustand: Highly positive, "made my life so much easier"
- Jotai: Highly positive, atomic state management
- Redux: Very negative, "done with Redux"
- Redux Toolkit: Much better alternative for existing Redux users
- MobX: Terrible experience due to memory leaks at Twitch (2018), acknowledges improvements since
- Recoil: Memory leak issues, Jotai superior alternative
- React Query: Should have been included, stable values and deterministic behavior
Data Fetching Libraries
- Apollo Client: Extremely negative, "biggest piles of tech debt ever encountered," cache invalidation issues, deep cloning problems
- Relay: Much better than Apollo but requires "PhD to set up correctly"
- RTK Query: Happy it exists, good for Redux users, won't personally use
- SWR: Too minimal, confusing mutation terminology usage
- tRPC: "Like gRPC but for Theo" - type-safe API solution
Meta Frameworks
- Next.js: Pretty cool
- Remix: Happy it exists, pushes standards forward
- Astro: Positive sentiment
- Gatsby: Effectively dead
- Create React App: Helped kickstart channel
- Redwood: GraphQL-focused, shouldn't start with GraphQL
Build Tools & Bundlers
- Vite: Saves life constantly
- esbuild: Incredible performance
- Turbo Pack: Hopes it gets stable
- TypeScript: Essential tooling
Hosting & Deployment
- Vercel: Positive experience
- Cloudflare: Neutral experience
- Fly.io: Negative, especially ARM binary issues with Rosetta
- AWS: Annoying but functional
- Netlify: Fine, gives credit where due
- Heroku: Happy it's dead
Backend Technologies
- Elixir: Highly positive
- TypeScript: Positive backend experience
- JavaScript: Negative backend experience
- Go: Fine experience
Alternative Rendering Platforms
- React Native: Incredible with Expo
- React PDF: Works for server PDF generation
- React Three Fiber: Highly positive, 3D Canvas with Three.js
- Remotion: Video editor in React, interesting concept
- React Email: Email template generation
Validation Libraries
- Zod: Highly positive
- Type Box: Really promising, fast performance
Other Frontend Frameworks Comparison
- Preact: Highly positive, helped understand web standards
- Solid: Highly positive
- Svelte: Increasingly positive, great primitives despite markup syntax concerns
- Angular: Negative experience
- Ember: Very negative, "hated every moment"
React Usage Patterns
- Using Canary builds professionally
- Multiple industry sectors: education, entertainment, news media, social media
- Various rendering patterns: SSR, SSG, streaming SSR, SPAs, Islands architecture
Community Sentiment & Concerns
- Very happy with current React state
- Excited about React Cache and React Forget (compiler)
- Main concern: React's popularity means many developers didn't choose React voluntarily
- Lower buy-in from average developers compared to frameworks like Svelte
- Survey likely indexes toward excited React users, not representative of all React developers
- Push-back on React advancements due to developer sentiment issues
Learning Resources
- This Week in React newsletter
- On-the-job training
- Self-directed learning
- Various developer influencers mentioned: Lee Robinson, TkDodo, Tanner Linsley, Kent Dodds, Josh Comeau
Demographics
- 11-20 years programming experience
- Small team size (2-5 developers)
- ADHD disclosure
