mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 22:57:57 +01:00
16 lines
501 B
TypeScript
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']],
|
||
|
});
|
||
|
}
|
||
|
}
|