You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/react-devtools-core/README.md
+18-3Lines changed: 18 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,15 +25,30 @@ if (process.env.NODE_ENV !== 'production') {
25
25
> **NOTE** that this API (`connectToDevTools`) must be (1) run in the same context as React and (2) must be called before React packages are imported (e.g. `react`, `react-dom`, `react-native`).
|`settings`| Optional. If not specified, or received as null, then default settings are used. Can be plain object or a Promise that resolves with the [plain settings object](#Settings). If Promise rejects, the console will not be patched and some console features from React DevTools will not work. |
28
+
| Argument | Description |
29
+
|---------------------------|-------------|
30
+
|`settings`| Optional. If not specified, or received as null, then default settings are used. Can be plain object or a Promise that resolves with the [plain settings object](#Settings). If Promise rejects, the console will not be patched and some console features from React DevTools will not work. |
31
+
|`shouldStartProfilingNow`| Optional. Whether to start profiling immediately after installing the hook. Defaults to `false`. |
32
+
|`profilingSettings`| Optional. Profiling settings used when `shouldStartProfilingNow` is `true`. Defaults to `{ recordChangeDescriptions: false, recordTimeline: false }`. |
33
+
|`componentFilters`| Optional. Array or Promise that resolves to an array of component filters to apply before DevTools connects. Defaults to the built-in host component filter. See [Component filters](#component-filters) for the full spec. |
Each filter object must include `type` and `isEnabled`. Some filters also require `value` or `isValid`.
42
+
43
+
| Type | Required fields | Description |
44
+
|------|-----------------|-------------|
45
+
|`ComponentFilterElementType` (`1`) |`type`, `isEnabled`, `value: ElementType`| Hides elements of the given element type. DevTools defaults to hiding host components. |
46
+
|`ComponentFilterDisplayName` (`2`) |`type`, `isEnabled`, `isValid`, `value: string`| Hides components whose display name matches the provided RegExp string. |
|`ComponentFilterEnvironmentName` (`5`) |`type`, `isEnabled`, `isValid`, `value: string`| Hides components whose environment name matches the provided string. |
50
+
|`ComponentFilterActivitySlice` (`6`) |`type`, `isEnabled`, `isValid`, `activityID`, `rendererID`| Filters activity slices; usually managed by DevTools rather than user code. |
0 commit comments