8

Fix SharePoint Framework projects to enable the React DevTools profiler

 2 years ago
source link: https://www.andrewconnell.com/blog/fix-spfx-projects-to-enable-the-react-devtools-profiler/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

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!

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK