PodRocket - A web development podcast from LogRocket cover image

PodRocket - A web development podcast from LogRocket

React concurrency with Ivan Akulov

Sep 19, 2023
Ivan Akulov, a web performance engineer and consultant, discusses React concurrency in React 18. Topics include time slicing, optimization of hydration, drawbacks of React concurrency, setting suspense boundaries, and their social media account and website for React and performance-related content.
35:22

Episode guests

Podcast summary created with Snipd AI

Quick takeaways

  • React 18 introduces time slicing, which improves user experience by splitting rendering work into smaller chunks.
  • Concurrency in React allows for multiple updates to run at the same time, enhancing app responsiveness and mimicking how a CPU handles multiple apps with a single core.

Deep dives

React Concurrency and Time Slicing

React 18 introduces the concept of React concurrency and time slicing. Time slicing is a feature that splits up rendering work into smaller chunks of 5 to 10 milliseconds, allowing the browser to handle user input in between the rendering. By using time slicing, the user experience is improved as the page does not freeze while rendering large components. However, time slicing needs to be enabled in React and properly applied to components. Concurrency in React allows for multiple updates to run at the same time, mimicking how a CPU handles multiple apps with a single core. React prioritizes important updates, such as synchronous clicks, over less important updates. Start Transition is a function in React that can be used to make updates non-urgent, improving app responsiveness. This can be particularly effective in scenarios where rendering large sets of data, such as tables or lists. However, it's important to note that start transition may not work optimally if any component within a set of updates is expensive to render.

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner