From d454482f433341e5770f0b46ab90cd7397ec9927 Mon Sep 17 00:00:00 2001 From: palash-signoz Date: Mon, 11 Apr 2022 17:17:31 +0530 Subject: [PATCH] wdyr is updated (#981) --- frontend/src/wdyr.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/frontend/src/wdyr.ts b/frontend/src/wdyr.ts index a69c889035..e64dcca566 100644 --- a/frontend/src/wdyr.ts +++ b/frontend/src/wdyr.ts @@ -1,17 +1,17 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ /* eslint-disable global-require */ /// // ^ https://github.com/welldone-software/why-did-you-render/issues/161 import React from 'react'; if (process.env.NODE_ENV === 'development') { - import('@welldone-software/why-did-you-render').then((whyDidYouRender) => { - whyDidYouRender.default(React, { - trackAllPureComponents: true, - trackHooks: true, - // https://github.com/welldone-software/why-did-you-render/issues/85#issuecomment-596682587 - trackExtraHooks: [require('react-redux/lib'), 'useSelector'], - include: [/^ConnectFunction/], - logOnDifferentValues: true, - }); + const whyDidYouRender = require('@welldone-software/why-did-you-render'); + whyDidYouRender(React, { + trackAllPureComponents: false, + trackExtraHooks: [[require('react-redux/lib'), 'useSelector']], + include: [/^ConnectFunction/], + logOnDifferentValues: true, }); } + +export default '';