React's Secret Weapon: Leveraging Concurrent Features for Top-Notch Performance

This ad is not shown to multipass and full ticket holders
JSNation US
JSNation US 2025
November 17 - 20, 2025
New York, US & Online
See JS stars in the US biggest planetarium
Learn More
In partnership with Focus Reactive
Upcoming event
JSNation US 2025
JSNation US 2025
November 17 - 20, 2025. New York, US & Online
Learn more
Bookmark
Rate this content

Discover how React's often overlooked concurrent features like startTransition, useDeferredValue, and Suspense can transform your application's performance and responsiveness. Learn practical techniques to prioritise critical updates, gracefully handle loading states, and create fluid user experiences even with complex data interactions.

This talk has been presented at React Advanced 2024, check out the latest edition of this React Conference.

FAQ

The talk is about concurrency within React and how it can be used to improve application performance.

The speaker is a software engineer currently working at Spotify.

The speaker started their journey into frontend development in 2017.

The two phases are the render phase and the commit phase.

The main concurrent APIs introduced in React 18 are useTransition, useDeferredValue, and extended Suspense for data fetching.

The useTransition hook allows developers to assign priority to a state update, distinguishing between high-priority and low-priority tasks.

The useDeferredValue hook defers the updates of a non-critical value on the UI, whereas useTransition assigns priority to a state update.

The task scheduler prioritizes tasks and executes them, yielding control back to the browser to handle high-priority tasks like user interactions.

Common use cases include handling real-time search inputs, seamless tab or component switching, rendering large lists, and ensuring smooth animations and transitions.

Concurrency in React is the ability to manage multiple tasks simultaneously, such as rendering the UI, responding to user input, and processing network requests without blocking the main thread.

Dara Olayebi
Dara Olayebi
25 min
25 Oct, 2024

Comments

Sign in or register to post your comment.
Video Summary and Transcription
I'm going to be speaking about concurrency within React and how you can use it to improve performance within your applications. Concurrency is crucial for optimizing responsiveness and ensuring a good user experience in complex applications. React breaks up the rendering process into render and commit phases, allowing interruption of the render phase for prioritizing user interactions. React's task scheduler handles tasks in small chunks, ensuring a fluid user experience and responsiveness. High-priority tasks include user interactions, while lower priority tasks involve fetching data or rendering long lists. React introduced new hooks, useTransition and useDeferredValue, for handling state update priorities. The deferred value hook allows for deferring the updates of non-critical UI values, while Suspense for Data Fetching improves the performance of data fetching in React applications. Concurrency is useful for handling real-time search inputs, seamless tab or component switching, rendering large lists, and animating transitions. However, there are drawbacks to concurrency, such as potential delays in non-urgent updates and limited benefits for expensive components. Concurrency may add CPU strain and requires an understanding of React's background behavior for effective debugging. Use suspense on parent level components for data fetching. Performance profiling can help test the effectiveness of transition hooks.

1. Introduction to Concurrency in React

Short description:

I'm going to be speaking about concurrency within React and how you can use it to improve performance within your applications. Today's agenda includes a background on the performance problem, concurrency under the hood in React, the main concurrent APIs introduced in React 18, use cases, and drawbacks. Concurrency is crucial for optimizing responsiveness and ensuring a good user experience in complex applications.

I'm happy to be here. Thank you for being here. Thanks Natalia for the introduction. I'm going to be speaking about concurrency within React and how you can use it to improve performance within your applications. And yeah, I'm a software engineer currently working at Spotify.

Before I get into the talk itself, just a bit of background on my journey and how I got into frontend. So it started around 2017. I did study a computer science course or like a heavily tech related course, but I did build a website as part of my degree and absolutely hated it. But I found myself learning HTML and CSS after graduation. And then I did that for a bit and finally got my first role in tech in 2018. And this was basically my introduction into frontend frameworks and more specifically React. And then I worked there for a bit and moved on to a crypto trading startup where I was working more heavily with just React. And then 2022 started a full stack role, which is my first full stack role at Spotify. So I actually work more with backend these days now, but I work Java on the backend and React on the frontend.

Okay, enough about me. So today, here's a quick agenda, what I'm going to be talking about. Starting with a bit of background on the performance problem. So why are we talking about concurrency in the first place? And then we'll talk a little bit about concurrency under the hood. So how React actually is, how React achieved concurrency. We'll look at the main concurrent APIs that were introduced in React 18. I'll talk through some use cases briefly and then some drawbacks because everything comes with a drawback. All right. So if you think about the applications you use on a day to day basis today, Instagram, Twitter, those applications rely on giving immediate feedback to the user, right? When I scroll through my Instagram feed, I'm getting feedback immediately. And the applications that we build today have become increasingly complex, right? Compared to many years ago. So there's more data that these applications have to handle, which means more renders, more computation. And all of this essentially means there's a higher chance of an increased burden on the performance of these applications. So essentially, this is kind of where concurrency comes in. It's crucial to optimize for responsiveness to ensure that the user experience on these applications are as good as possible.

So here. And on to the main subject.

2. The What and How of Concurrency

Short description:

Concurrency is the ability to manage multiple tasks simultaneously without blocking the main thread. React breaks up the rendering process into render and commit phases. In the render phase, React compares the existing DOM to the virtual DOM, calculates the diff, and determines the necessary changes. The commit phase applies these changes to the DOM, allowing interruption of the render phase for prioritizing user interactions.

The what and the how of concurrency. In a nutshell, concurrency is the ability to manage multiple tasks simultaneously, such as rendering the user interface, responding to user input, processing network requests, and doing all of this without blocking or slowing down the main thread. So let's look a bit into the background of this and how React actually achieves this.

So top image, synchronous, bottom image, concurrent. And the rendering process in React is broken up into two phases. So there's the render phase, and there's the commit phase. So if you look at the first image, you notice that the render phase, which is where React will compare the existing DOM to the virtual DOM, calculate the diff, and basically do this computation and determine what changes need to be made. And then the commit phase is where React will actually apply these changes to the DOM.

So if you look at the first image, it's just one long continuous block of rendering, right? And then we have the commit, and then we have these tasks. And what that means, typically, pre-React 18, is that the render phase could not be interrupted. So when I load a component or a page, React has to complete that render phase before the user can actually interact with the web page. So the commit phase, as you can see, basically makes this process interruptible. So if you look at the bottom image, you notice that this render phase is broken up into small chunks and essentially, React has created something quite intelligent, where instead of rendering everything all in one block, it can actually interrupt this render phase and the user can prioritize user interactions between the render phase.

3. The Task Scheduler and Concurrency Model

Short description:

React handles tasks in small chunks, ensuring a fluid user experience and responsiveness. The task scheduler is the engine behind the concurrency model, breaking render work into chunks and prioritizing tasks such as user interactions.

So notice that we have these small chunks of rendering. We have a task, which could represent a user event like a click or typing. Then React goes back to the render, handles the task, and it's that back and forth, which means that our applications have a more fluid user experience, and then they're more responsive.

So here's a very basic, very high-level, amateur-ish diagram that I created to kind of represent what goes on behind the scenes. We see our web browser, we see the React application, and then we see something called a task scheduler. This scheduler is sort of like the engine behind this concurrency model.

So what it does is, firstly, I've mentioned that the work or the render is broken up into small units, right? This concept is called time-slicing, so the render work that is required is broken up into chunks. And then what the scheduler does, it looks at all the tasks that need to be handled and prioritizes them and then executes these tasks. So a high-priority task can be considered as a user clicking into an input field, or a user trying to scroll or typing.

4. React's Task Priority System

Short description:

High-priority tasks include user interactions like clicking a button, while lower priority tasks involve fetching data or rendering long lists. The built-in task scheduler assigns priority and yields control to the browser every five milliseconds, ensuring timely handling of high-priority tasks. React takes over and continues rendering after the browser handles the task. Screenshots from the scheduler package on React's official repository demonstrate the work loop function checking for high-priority tasks and the should yield to host function determining control transfer to the browser.

So a high-priority task can be considered as a user clicking into an input field, or a user trying to scroll or typing. Yeah, clicking a button, for example, that's high-priority because, like I said, the user expects immediate feedback, right? I don't want to click on a button and it freezes. And the lower priority is fetching data from a backend or rendering some kind of long list.

So this task, this built-in task scheduler, basically assigns this priority to the different tasks, and then it yields control back to the browser every five milliseconds. So whenever it notices there's a click on the screen, it will basically say, browser, this is important, handle this. Once that's done, React takes over and continues rendering. If there's another click, it yields control back to the browser and so on and so forth. And it does this by default every five milliseconds. So basically just checking continuously whether there's any high-priority task that needs to be completed.

These are screenshots I took to kind of make this more real from the scheduler package on React's official repository. So notice on the left, we have this work loop function. Again, like I said, this continues checking for high-priority tasks. And then to the right, there's a function called should yield to host, and that's what determines whether host beamed the browser. In this case, that's what determines whether React should give control to the browser or continue the render process.

5. Practical Use of Concurrent APIs

Short description:

React introduced new hooks, useTransition and useDeferredValue, for handling state update priorities. useTransition allows us to assign priority to state updates using a startTransition method. It distinguishes between high priority tasks like setText and lower priority tasks like setTheme. The startTransition method can be imported directly from React.

Okay, so on to the more practical things now. So we kind of know how all of this is working behind the scenes. And React has abstracted away all this complexity from the users, which is you and I, via these concurrent APIs. So when version 18 was released, which is when concurrency really was introduced, they released these two new hooks, useTransition, useDeferredValue, and then the extended suspense for data fetching.

So I will talk through each of these, starting with useTransition. Essentially, this allows us to assign priority to a state update. So just like I mentioned before, the task scheduler uses a priority queue to determine what's important, what's not important. useTransition is what allows us to actually handle this priority as users, as end users of React. So in the code on the left, it's just a normal hook. So it returns two values, an isPending flag, which is a Boolean value, and then it returns a method called startTransition. And if you look inside this handleClick method, we have this setText, which is considered a high priority task. Maybe that's not the best example, but just to compare it to setTheme, which is wrapped inside this startTransition method, and that's considered lower priority.

So whenever you have any state updates inside startTransition, it's considered a transition update, which is not as important as the other updates or the other things that need to be rendered. You can also directly import this startTransition method. So if for some reason you don't want to use a hook, or you can't use a hook when you're on those specific components, you can use the startTransition method, import it directly from React. Okay, so I hope this works.

6. Effects of useTransition Hook

Short description:

The next series of slides demonstrate the effects of using the useTransition hook. On a fast computer without useTransition, the bubble chart updates happen immediately, but with useTransition, there is a slight pause. On a slow computer without useTransition, there is significant lag, negatively impacting the user experience. However, with useTransition, the slider remains responsive, and the bubble charts fade slightly to indicate a loading state. This results in a more pleasant user experience.

Oh, okay, I think it's going to keep looping. But these, the next series of slides are videos from the React 18 working group websites that I pulled. It's basically a website that has this chart, and this, I think it's called a bubble chart, and it has this slider at the top somewhere at the top left, where you see minimum score. I'm not sure if I can get this to replay. Maybe if I go back.

So if you note, this is an example of this transition or this interaction happening on a fast computer that does not use transition or the useTransition hook. And just go back again. So notice as you're sliding, the content is changing based on what value the slider is on. So this one looks normal. But this is what it looks like with a useTransition. So again, notice that the bubble chart updates are much, they don't happen as soon as you slide. Again, kind of helps the user determine, okay, I'm on this score now, and this is like, there's a slight pause. And this is even more prominent or more pronounced with slow computers.

So here's another example, a slow computer that doesn't use transition. And notice how much lag there is. And this happens quite often. You visit a website that's handling, say, a lot of data, and we're trying to move something or click something, and it just lags. So I'm going to go back again. So just to see that lag. And yeah, there was even, I think, some failure there, but it's not a positive user experience. I think we can all agree on that. And then here's the example with useTransition on a slow computer. So for this to work, they actually throttle the CPU speed, just to see the effectiveness of this. So I'll play that again. And you see that the slider is not frozen, so I can move back and forth quite easily. And notice this, like, the bubble charts kind of fade slightly, which kind of indicates some kind of loading state, and they're using the isPending flag to be able to do that. So overall, it kind of makes for a more pleasant user experience. Play that one more time. As we slide, we can slide easily, and then the data is returned to us on-demand. So in this case, the chart updates are considered, or have been wrapped inside a startTransition method, and they're considered less priority.

7. Deferred Value and Suspense for Data Fetching

Short description:

The deferred value hook allows for deferring the updates of non-critical UI values. This ensures a smoother user experience by reducing lag in certain components. Another feature, Suspense for Data Fetching, allows for pausing the render of a component until the required data is resolved. This improves the performance of data fetching in React applications.

And the slider is considered a high-priority update, so React will prioritize that movement and then handle this bubble chart update afterwards. Use deferred value. So this is quite similar to useTransition, but instead of assigning priority to a state update, what we can do with this is basically defer the updates of a value on the UI. So if there's a value that I have, and I don't naturally need it to be updated immediately, I would then use this hook.

So it's specifically for values that might potentially affect my user experience that are not critical to the user's, to the components, or not to the components, to the user interaction, rather. So here, I just have defined the hook like normal. It takes in the value that you want to defer, and then it returns that value back to you. So here, deferred is just in a p tag, and it's considered less priority than the rest of the page.

So here's another video. It's just basically, I created this simple, just an input field, and as I type, it essentially displays what I'm typing into that input field. I've also added that red dot there, just so you can indicate when I'm actually typing. So notice again, the amount of lag there is, and just also the list that's displaying this input field has actually been artificially slowed down. Again, to kind of show how this works in practice, and then here, I'm using the hook. And you kind of notice the change. So I've defined the hook there, and the value that's returned by the hook, I'm then passing that into this slow list component. So notice again, as I'm typing, there's no lag. The red dot is there more permanently, and then the data doesn't update immediately. So again, the names don't necessarily need to be displayed immediately, but as I'm typing, which is a high priority task, I want that to happen, and I want immediate feedback.

And then the last concurrent feature today I'm going to be talking about is Suspense for Data Fetching. So Suspense has existed since React 16, but in React 18, they've essentially extended the functionality of Suspense. So typically, we would use Suspense to lazy load a component, so if we don't necessarily want the component to be rendered when it's not needed, we would use Suspense for that. And then now, what we can use Suspense for is to basically pause the render of a component until the data it requires has been resolved. So here I have an example. This data variable has to use async data, and essentially, that Suspense should have a component inside it, but the component would only be rendered after I have the data that the component is using. So here I have two examples, Data Fetching before and after. I have this ArtistList component, and this is how we typically would do it today. So we would have a useEffect where we would call this API, we would have a setIsLoading to true, and then set that to false once the result has resolved. And then I have this loadingArtist to check when loading is true, and then I'm just rendering the data. So on the right, I'm pretty much doing the same thing, but I'm using Suspense which can now handle Data Fetching. So here I have my ArtistList component wrapped inside the Suspense.

8. Fallbacks and Suspense for Data Fetching

Short description:

Using fallbacks and Suspense for Data Fetching allows for efficient rendering of components that depend on asynchronous data. This feature works best with Data Fetching libraries like React Query.

I have my fallback, and notice I don't need the useEffect anymore. I've defined the ArtistList function at the bottom, and then again, the data that you see defined there that's equals to resourced or re-data is the data that the ArtistList component needs. And essentially, until this ArtistList component has, or until this data has been resolved, then the component is basically suspended. So React pauses that render until the data is ready. And just one caveat here is that this currently only works if you're using some kind of Data Fetching library like React Query, so the Data Fetching mechanism needs to be Suspense aware. So this typically wouldn't work with just like regular fetch calls without any library.

9. Performance Profiling and Drawbacks of Concurrency

Short description:

Profiling the performance of the synchronous and concurrent versions, we observed that the tasks in the concurrent version were much smaller, resulting in improved efficiency. Concurrency is useful for handling real-time search inputs, seamless tab or component switching, rendering large lists, and animating transitions. However, there are drawbacks to concurrency, such as potential delays in non-urgent updates and limited benefits for expensive components.

Okay, so now that's done, with one of the examples, I basically did a quick recording of the performance. So I did some profiling here, and you can see the top one is the synchronous version, the bottom one is the concurrent version. So I think this was, I used the useDeferredValue example with typing the artist's names. If you focus on the top image, you can see this red bar and in Chrome that represents what is considered a long task. And I've put in brackets there, if you hover over it, that took 403 milliseconds. So again, you see this, the chunks are much longer compared to the bottom one when I added this useDeferredValue hook, and you see that the tasks are much, much smaller. So this is how React kind of handles these events or these tasks in small chunks. Oh, and yeah, 0.1 milliseconds per task, whereas the other one was 403 milliseconds per task. So lots of practical work that we've just looked at here.

How do you actually use this, or when do you actually use this for other? These are just a few examples, there are many more than you might imagine, but I think these are the most common examples that I wanted to highlight. Firstly, handling real-time search inputs. So if you have a search field that renders some kind of data every time you type into it, so depending on what inputs you've typed into it, it returns data to you. Concurrency is great for that because again, preventing UI freeze. And then seamless tab or component switching. So React has a good example on its docs, actually, of how this works. If you have a few tabs and you're switching between them quite quickly, and say those tabs depend on data coming from a server, the button or the tab itself, the clicking might freeze. So you would use something like start transition to set this set tab as a low priority update. And then rendering large lists. So again, this is resource intensive. And then finally, show animations and transitions, so anything that might potentially affect the fluidity of animations or transitions on a webpage.

Drawbacks. The important stuff. So yeah, there are a few drawbacks with concurrency, so it definitely does come at some cost. Firstly, it may actually delay the non-urgent updates. So what we're doing is we're setting specific updates to be not as important. So we're saying de-prioritize this and prioritize something else. And this could actually have an adverse effect on your user experience, of course, if you're not using it in the right way. So especially if you think of a slow device, for example, the non-urgent updates could actually be much slower than you need it to be. And then it doesn't necessarily have any benefits for expensive components. So if a component is quite large and it takes 500 milliseconds to render, regardless of whether or not you're using concurrency, this amount of time is how long it would take you to render that component.

10. CPU Strain and Background Behavior of Concurrency

Short description:

Concurrency may add CPU strain and requires an understanding of React's background behavior for effective debugging. React can manage and render multiple versions of the UI simultaneously, but concurrency is not enabled by default. It prioritizes important user events to make the application feel faster.

Thirdly, may add CPU strain. So think of all the things that are happening in the background, all the overhead that React has included. So the yielding to the browser, the scheduling, prioritization, all that stuff. Add some kind of overhead, and if you're using concurrency on a low-end device, or, say, on a task that's, on the other hand, on a component that's already optimized, or on like a CPU-heavy intensive component, it might actually have insignificant benefits for you. So it's important to kind of weigh out the performance trade-offs when it comes to concurrency.

And then finally, I think requires is the wrong word here, but it's more a... If you would like to use concurrency within your applications, it does help to have some background of what's happening behind the scenes so that you can be able to debug better. If there's some weird behavior going on, then you know, okay, this is why I understand what React is doing in the background. So there's just that learning curve for developers.

Concurrency means that React can now manage and render multiple versions of the UI at once. So it's doing all of this simultaneously. Concurrency is not enabled by default, so you actually have to opt into concurrency via these concurrent features that I highlighted. And then finally, it doesn't actually make your application faster, but it makes it feel faster by the prioritization of important user events.

11. Suspense and Testing with Transition Hooks

Short description:

Use suspense on parent level components for data fetching. Transition hooks focus on UI responsiveness, while debounce has a broader scope. Performance profiling can help test the effectiveness of these hooks. No significant differences in testing, but overuse may negatively impact the application.

So, and that's everything. Thank you very much for listening.

All right. So we have a few questions that came in, and I'll go through them. And one of the first ones is about suspense and asking, should we use suspense on parent or child level components, I believe? Okay. That's a good question. I think when it comes to, if you're, they're asking specifically about suspense for data fetching, if you consider any application that, so I think the benefits of suspense is that it kind of allows you to split up this data fetching logic from the application that actually uses it. So you can have your logic in another component that's wrapped in suspense and then have this child component where you're just rendering the UI or the data that's received. So I would say to use it in the parents and then in the child, you just render the data that's returned.

Awesome. Thank you. And by the way, I just want to remind everyone as well, please scan the QR code as well and give your rating. You can rate the talk out of five stars. And we've got a few more questions coming in. And this one is about what's the benefits of using transitions over some form of like a de-balance as well? Yeah, that's a good question. Definitely something that users kind of consider. So I think use deferred, use transition or use deferred value. Those hooks are very focused on the user interface responsiveness, right? Whereas something like de-balance has, I think I would say a broader scope where you can kind of control function calls. So if you have a use case where the responsiveness or the interactivity has some kind of performance issue, then I would say use deferred value or use transition. But if it's, I guess, broader than that, and you're trying to say, limit the amount of times a certain function is called within your component, then de-balance works better for that. So those hooks are very focused on UI responsiveness and ensuring there's like a smooth interaction between the user and the application.

I love that. And also the kind of distinction between there is something maybe being performance in a background and something feeling performance to the user and using the right tool to get one of those. The next question, because we always think about testing and making sure that we can test our code, how does this affect testability? Or are there some ways we can test or implement tests on these kinds of things? Good question. I think so. I kind of focused on this performance profiling when it came to kind of testing the actual effectiveness of these hooks. So that's one thing you could do, kind of measure or profile what was happening before and what's happening now. But I think I wouldn't say there's any significant differences when it comes to testing. I think it's more just being able to identify whether or not these before you diving into using these hooks, being able to identify whether the, I guess, the results or the what you would like to achieve is significant enough. Because sometimes if there's like overuse of these features, it could actually have a negative impact on the application. Awesome. Thank you so much.

As you can see, there are more questions, but we do not have time for questions, unfortunately, but she can find her in the speakers Q&A. And also, where can people find you online? LinkedIn, Dara Olaibi, Twitter, Dara Olaibi, Instagram, Dara Olaibi. Awesome. Thank you. Can we get a five out of five round of applause for Dara one more time? Thank you.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

A Guide to React Rendering Behavior
React Advanced 2022React Advanced 2022
25 min
A Guide to React Rendering Behavior
Top Content
This transcription provides a brief guide to React rendering behavior. It explains the process of rendering, comparing new and old elements, and the importance of pure rendering without side effects. It also covers topics such as batching and double rendering, optimizing rendering and using context and Redux in React. Overall, it offers valuable insights for developers looking to understand and optimize React rendering.
Speeding Up Your React App With Less JavaScript
React Summit 2023React Summit 2023
32 min
Speeding Up Your React App With Less JavaScript
Top Content
Watch video: Speeding Up Your React App With Less JavaScript
Mishko, the creator of Angular and AngularJS, discusses the challenges of website performance and JavaScript hydration. He explains the differences between client-side and server-side rendering and introduces Quik as a solution for efficient component hydration. Mishko demonstrates examples of state management and intercommunication using Quik. He highlights the performance benefits of using Quik with React and emphasizes the importance of reducing JavaScript size for better performance. Finally, he mentions the use of QUIC in both MPA and SPA applications for improved startup performance.
React Concurrency, Explained
React Summit 2023React Summit 2023
23 min
React Concurrency, Explained
Top Content
Watch video: React Concurrency, Explained
React 18's concurrent rendering, specifically the useTransition hook, optimizes app performance by allowing non-urgent updates to be processed without freezing the UI. However, there are drawbacks such as longer processing time for non-urgent updates and increased CPU usage. The useTransition hook works similarly to throttling or bouncing, making it useful for addressing performance issues caused by multiple small components. Libraries like React Query may require the use of alternative APIs to handle urgent and non-urgent updates effectively.
Understanding React’s Fiber Architecture
React Advanced 2022React Advanced 2022
29 min
Understanding React’s Fiber Architecture
Top Content
This Talk explores React's internal jargon, specifically fiber, which is an internal unit of work for rendering and committing. Fibers facilitate efficient updates to elements and play a crucial role in the reconciliation process. The work loop, complete work, and commit phase are essential steps in the rendering process. Understanding React's internals can help with optimizing code and pull request reviews. React 18 introduces the work loop sync and async functions for concurrent features and prioritization. Fiber brings benefits like async rendering and the ability to discard work-in-progress trees, improving user experience.
How React Compiler Performs on Real Code
React Advanced 2024React Advanced 2024
31 min
How React Compiler Performs on Real Code
Top Content
I'm Nadia, a developer experienced in performance, re-renders, and React. The React team released the React compiler, which eliminates the need for memoization. The compiler optimizes code by automatically memoizing components, props, and hook dependencies. It shows promise in managing changing references and improving performance. Real app testing and synthetic examples have been used to evaluate its effectiveness. The impact on initial load performance is minimal, but further investigation is needed for interactions performance. The React query library simplifies data fetching and caching. The compiler has limitations and may not catch every re-render, especially with external libraries. Enabling the compiler can improve performance but manual memorization is still necessary for optimal results. There are risks of overreliance and messy code, but the compiler can be used file by file or folder by folder with thorough testing. Practice makes incredible cats. Thank you, Nadia!
The Future of Performance Tooling
JSNation 2022JSNation 2022
21 min
The Future of Performance Tooling
Top Content
Today's Talk discusses the future of performance tooling, focusing on user-centric, actionable, and contextual approaches. The introduction highlights Adi Osmani's expertise in performance tools and his passion for DevTools features. The Talk explores the integration of user flows into DevTools and Lighthouse, enabling performance measurement and optimization. It also showcases the import/export feature for user flows and the collaboration potential with Lighthouse. The Talk further delves into the use of flows with other tools like web page test and Cypress, offering cross-browser testing capabilities. The actionable aspect emphasizes the importance of metrics like Interaction to Next Paint and Total Blocking Time, as well as the improvements in Lighthouse and performance debugging tools. Lastly, the Talk emphasizes the iterative nature of performance improvement and the user-centric, actionable, and contextual future of performance tooling.

Workshops on related topic

React Performance Debugging Masterclass
React Summit 2023React Summit 2023
170 min
React Performance Debugging Masterclass
Top Content
Featured Workshop
Ivan Akulov
Ivan Akulov
Ivan’s first attempts at performance debugging were chaotic. He would see a slow interaction, try a random optimization, see that it didn't help, and keep trying other optimizations until he found the right one (or gave up).
Back then, Ivan didn’t know how to use performance devtools well. He would do a recording in Chrome DevTools or React Profiler, poke around it, try clicking random things, and then close it in frustration a few minutes later. Now, Ivan knows exactly where and what to look for. And in this workshop, Ivan will teach you that too.
Here’s how this is going to work. We’ll take a slow app → debug it (using tools like Chrome DevTools, React Profiler, and why-did-you-render) → pinpoint the bottleneck → and then repeat, several times more. We won’t talk about the solutions (in 90% of the cases, it’s just the ol’ regular useMemo() or memo()). But we’ll talk about everything that comes before – and learn how to analyze any React performance problem, step by step.
(Note: This workshop is best suited for engineers who are already familiar with how useMemo() and memo() work – but want to get better at using the performance tools around React. Also, we’ll be covering interaction performance, not load speed, so you won’t hear a word about Lighthouse 🤐)
Concurrent Rendering Adventures in React 18
React Advanced 2021React Advanced 2021
132 min
Concurrent Rendering Adventures in React 18
Top Content
Featured Workshop
Maurice de Beijer
Maurice de Beijer
With the release of React 18 we finally get the long awaited concurrent rendering. But how is that going to affect your application? What are the benefits of concurrent rendering in React? What do you need to do to switch to concurrent rendering when you upgrade to React 18? And what if you don’t want or can’t use concurrent rendering yet?

There are some behavior changes you need to be aware of! In this workshop we will cover all of those subjects and more.

Join me with your laptop in this interactive workshop. You will see how easy it is to switch to concurrent rendering in your React application. You will learn all about concurrent rendering, SuspenseList, the startTransition API and more.
Next.js 13: Data Fetching Strategies
React Day Berlin 2022React Day Berlin 2022
53 min
Next.js 13: Data Fetching Strategies
Top Content
Workshop
Alice De Mauro
Alice De Mauro
- Introduction- Prerequisites for the workshop- Fetching strategies: fundamentals- Fetching strategies – hands-on: fetch API, cache (static VS dynamic), revalidate, suspense (parallel data fetching)- Test your build and serve it on Vercel- Future: Server components VS Client components- Workshop easter egg (unrelated to the topic, calling out accessibility)- Wrapping up
React Performance Debugging
React Advanced 2023React Advanced 2023
148 min
React Performance Debugging
Workshop
Ivan Akulov
Ivan Akulov
Ivan’s first attempts at performance debugging were chaotic. He would see a slow interaction, try a random optimization, see that it didn't help, and keep trying other optimizations until he found the right one (or gave up).
Back then, Ivan didn’t know how to use performance devtools well. He would do a recording in Chrome DevTools or React Profiler, poke around it, try clicking random things, and then close it in frustration a few minutes later. Now, Ivan knows exactly where and what to look for. And in this workshop, Ivan will teach you that too.
Here’s how this is going to work. We’ll take a slow app → debug it (using tools like Chrome DevTools, React Profiler, and why-did-you-render) → pinpoint the bottleneck → and then repeat, several times more. We won’t talk about the solutions (in 90% of the cases, it’s just the ol’ regular useMemo() or memo()). But we’ll talk about everything that comes before – and learn how to analyze any React performance problem, step by step.
(Note: This workshop is best suited for engineers who are already familiar with how useMemo() and memo() work – but want to get better at using the performance tools around React. Also, we’ll be covering interaction performance, not load speed, so you won’t hear a word about Lighthouse 🤐)
Getting Started with Suspense and Concurrent Rendering in React
React Summit 2020React Summit 2020
125 min
Getting Started with Suspense and Concurrent Rendering in React
Workshop
Maurice de Beijer
Maurice de Beijer
React keeps on evolving and making hard things easier for the average developer.
One case, where React was not particularly hard but very repetitive, is working with AJAX request. There is always the trinity of loading, success and possible error states that had to be handled each time. But no more as the `<Suspense />` component makes life much easier.
Another case is performance of larger and complex applications. Usually React is fast enough but with a large application rendering components can conflict with user interactions. Concurrent rendering will, mostly automatically, take care of this.
You will learn all about using <Suspense />, showing loading indicators and handling errors. You will see how easy it is to get started with concurrent rendering. You will make suspense even more capable combining it with concurrent rendering, the `useTransition()` hook and the <SuspenseList /> component.
Building WebApps That Light Up the Internet with QwikCity
JSNation 2023JSNation 2023
170 min
Building WebApps That Light Up the Internet with QwikCity
WorkshopFree
Miško Hevery
Miško Hevery
Building instant-on web applications at scale have been elusive. Real-world sites need tracking, analytics, and complex user interfaces and interactions. We always start with the best intentions but end up with a less-than-ideal site.
QwikCity is a new meta-framework that allows you to build large-scale applications with constant startup-up performance. We will look at how to build a QwikCity application and what makes it unique. The workshop will show you how to set up a QwikCitp project. How routing works with layout. The demo application will fetch data and present it to the user in an editable form. And finally, how one can use authentication. All of the basic parts for any large-scale applications.
Along the way, we will also look at what makes Qwik unique, and how resumability enables constant startup performance no matter the application complexity.