wisemapping-frontend/packages/webapp/src/wdyr.ts
2022-11-12 18:44:29 -08:00

16 lines
501 B
TypeScript

/// <reference types="@welldone-software/why-did-you-render" />
import React from 'react';
if (process.env.NODE_ENV === 'development') {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const whyDidYouRender = require('@welldone-software/why-did-you-render');
if (process.env.NODE_ENV === 'development') {
whyDidYouRender(React, {
trackAllPureComponents: true,
trackHooks: true,
trackExtraHooks: [[require('react-redux/lib'), 'useSelector']],
});
}
}