mirror of
https://github.com/grafana/grafana.git
synced 2024-11-24 09:50:29 -06:00
278c312d58
* React: Add why-did-you-render dev extension to better understand what components re-renders * Lock version * Updated yarn locj
12 lines
353 B
TypeScript
12 lines
353 B
TypeScript
import React from 'react';
|
|
|
|
export function initDevFeatures() {
|
|
// if why-render is in url enable why did you render react extension
|
|
if (window.location.search.indexOf('why-render') !== -1) {
|
|
const whyDidYouRender = require('@welldone-software/why-did-you-render');
|
|
whyDidYouRender(React, {
|
|
trackAllPureComponents: true,
|
|
});
|
|
}
|
|
}
|