wisemapping-frontend/packages/webapp/src/wdyr.ts

16 lines
501 B
TypeScript
Raw Normal View History

2022-11-13 03:42:52 +01:00
/// <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']],
});
}
}