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!
By default, #SharePoint Framework projects that use #React don't support the React DevTools Profiler... and the error isn't clear as to why. Thankfully, it's easily fixable by modifying the bundling process. Learn how in this post! https://t.co/mT0FxHkqS9 pic.twitter.com/uWsDLhZtLX
— Voitanos (@voitanos) December 28, 2021