forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wdyr.js
29 lines (24 loc) · 889 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
29
// Implements Why Did You Render (WDYR) in Dev
import React from 'react';
import Config from 'react-native-config';
import lodashGet from 'lodash/get';
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/
],
});
}