Fix SharePoint Framework projects to enable the React DevTools profiler

Tuesday, December 28, 2021 6:37 AM

A few years ago, React introduced the React Profiler to React v16.5 in the React DevTools plugin available for Chromium browsers (Chrome & CrEdge) and Firefox.

Developers can use the Profiler API to collect timing information about each component that’s rendered in order to identify performance bottlenecks in React applications.

For those of us creating React apps in SharePoint Framework (SPFx) solutions, this is a great resource for building well performing apps for your customers!

Cool right?

Sure… it’s cool… but when you try to use it, it won’t work & throws an error.

In this post, learn why the React DevTools Profiler doesn’t work for SharePoint Framework projects & how to fix it!