Syntax - Tasty Web Development Treats

React 18 - A Look Ahead

Jul 14, 2021
Discover the exciting features of React 18, including automatic batching, new render APIs, and the powerful Suspense functionality that enhances data fetching and UI development. Learn how server-side rendering has evolved, merging server-rendered and client-rendered components for better performance. The hosts also tackle React's naming conventions and the significance of tools like Sentry for error handling. Plus, get insights into audio management solutions and the benefits of community engagement in web development!
Ask episode
AI Snips
Chapters
Transcript
Episode notes
ADVICE

Automatic Batching

  • React developers should no longer worry about multiple setStates triggering excessive re-renders.
  • React 18 now automatically batches these updates for better performance.
INSIGHT

New Render API

  • The new render API in React 18 simplifies server-side rendering (SSR) by eliminating the hydrate method.
  • This change streamlines the process and resolves inconsistencies between server and client rendering.
ADVICE

Suspense for Data Fetching

  • Use Suspense in React 18 to manage loading states efficiently, preventing unnecessary spinners.
  • Wrap components that fetch data with Suspense and define a fallback to display after a set time.
Get the Snipd Podcast app to discover more snips from this episode
Get the app