forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wdyr.js
28 lines (24 loc) · 888 Bytes
/
wdyr.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Implements Why Did You Render (WDYR) in Dev
import lodashGet from 'lodash/get';
import React from 'react';
import Config from 'react-native-config';
const useWDYR = lodashGet(Config, 'USE_WDYR') === 'true';
if (useWDYR) {
const whyDidYouRender = require('@welldone-software/why-did-you-render');
whyDidYouRender(React, {
// Enable tracking in all pure components by default
trackAllPureComponents: true,
include: [
// Uncomment to enable tracking in all components. Must also uncomment /^Screen/ in exclude.
// /.*/,
// Uncomment to enable tracking by displayName, e.g.:
// /^Avatar/,
// /^ReportActionItem/,
// /^ReportActionItemSingle/,
],
exclude: [
// Uncomment to enable tracking in all components
// /^Screen/
],
});
}