What is the use of the Profiler API in React?

The Profiler API measures rendering performance of components, tracking render times and identifying bottlenecks.

<Profiler id="MyComponent" onRender={handleRender}>
  <MyComponent />
</Profiler>