React · Senior · Question 20 of 75

What's the most accurate way to find which components are slow during interaction?

Explanation

The Profiler shows which components rendered, how long it took and why (enable "Record why each component rendered"). The Performance panel shows long tasks, layout and paint. Optimizing blindly leads to unnecessary complexity. For metrics in code there's <Profiler onRender>.

Further reading

Problem with a question

React · Senior · question 20

Test yourself

Take the React · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz