nitin42 / react-perf-devtool

A browser developer tool extension to inspect performance of React components.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

app doesn't load in IE or Edge

jacobworrel opened this issue · comments

I believe this is because IE and Edge do not support window.PerformanceObserver (see https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver).

For now I've solved this by doing the following:

if (
  window.PerformanceObserver &&
  process.env.NODE_ENV !== 'production' &&
  process.env.NODE_ENV !== 'test'
) {
  const { registerObserver } = require('react-perf-devtool');
  registerObserver();
}

Thanks! We should really check whether the browser has support for the Observer API. Updated and released version 3.0.5.

Also, I am adding you as a collaborator on this project (if you have no issues?)