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: README.md
+41-32Lines changed: 41 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,7 +121,6 @@ import React from 'react';
121
121
scan({
122
122
enabled:true,
123
123
log:true, // logs render info to console (default: false)
124
-
clearLog:false, // clears the console per group of renders (default: false)
125
124
});
126
125
```
127
126
@@ -169,19 +168,19 @@ scan({
169
168
* Long task threshold in milliseconds, only show
170
169
* when main thread is blocked for longer than this
171
170
*/
172
-
longTaskThreshold:50;
171
+
longTaskThreshold:50,
173
172
174
173
/**
175
-
* Clear aggregated fibers after this time in milliseconds
174
+
* Report data to getReport()
176
175
*/
177
-
resetCountTimeout:5000;
178
-
179
-
onCommitStart?: () =>void;
180
-
onRender?: (fiber, render) =>void;
181
-
onCommitFinish?: () =>void;
182
-
onPaintStart?: (outline) =>void;
183
-
onPaintFinish?: (outline) =>void;
184
-
})
176
+
report:false,
177
+
178
+
onCommitStart: () =>{},
179
+
onRender: (fiber, render) =>{},
180
+
onCommitFinish: () =>{},
181
+
onPaintStart: (outline) =>{},
182
+
onPaintFinish: (outline) =>{},
183
+
});
185
184
```
186
185
187
186
</details>
@@ -232,19 +231,19 @@ withScan(Component, {
232
231
* Long task threshold in milliseconds, only show
233
232
* when main thread is blocked for longer than this
234
233
*/
235
-
longTaskThreshold:50;
234
+
longTaskThreshold:50,
236
235
237
236
/**
238
-
* Clear aggregated fibers after this time in milliseconds
237
+
* Report data to getReport()
239
238
*/
240
-
resetCountTimeout:5000;
241
-
242
-
onCommitStart?: () =>void;
243
-
onRender?: (fiber, render) =>void;
244
-
onCommitFinish?: () =>void;
245
-
onPaintStart?: (outline) =>void;
246
-
onPaintFinish?: (outline) =>void;
247
-
})
239
+
report:false,
240
+
241
+
onCommitStart: () =>{},
242
+
onRender: (fiber, render) =>{},
243
+
onCommitFinish: () =>{},
244
+
onPaintStart: (outline) =>{},
245
+
onPaintFinish: (outline) =>{},
246
+
});
248
247
```
249
248
250
249
</details>
@@ -257,6 +256,8 @@ withScan(Component, {
257
256
Get a aggregated report of all components and renders.
258
257
259
258
```jsx
259
+
scan({ report:true });
260
+
260
261
constreport=getReport();
261
262
262
263
for (constcomponentin report) {
@@ -310,19 +311,19 @@ setOptions({
310
311
* Long task threshold in milliseconds, only show
311
312
* when main thread is blocked for longer than this
312
313
*/
313
-
longTaskThreshold:50;
314
+
longTaskThreshold:50,
314
315
315
316
/**
316
-
* Clear aggregated fibers after this time in milliseconds
317
+
* Report data to getReport()
317
318
*/
318
-
resetCountTimeout:5000;
319
-
320
-
onCommitStart?: () =>void;
321
-
onRender?: (fiber, render) =>void;
322
-
onCommitFinish?: () =>void;
323
-
onPaintStart?: (outline) =>void;
324
-
onPaintFinish?: (outline) =>void;
325
-
})
319
+
report:false,
320
+
321
+
onCommitStart: () =>{},
322
+
onRender: (fiber, render) =>{},
323
+
onCommitFinish: () =>{},
324
+
onPaintStart: (outline) =>{},
325
+
onPaintFinish: (outline) =>{},
326
+
});
326
327
```
327
328
328
329
</details>
@@ -416,12 +417,20 @@ We expect all contributors to abide by the terms of our [Code of Conduct](https:
416
417
-[x] Don't show label if no reconciliation occurred ("client renders" in DevTools)
417
418
-[x] "global" counter using `sessionStorage`, aggregate count stats instead of immediate replacement
418
419
-[x] Give a general report of the app's performance
419
-
420
+
-[ ] checkbox filtering API, leaderboard
421
+
-[ ] Offscreen canvas on worker thread
422
+
-[x] heatmap decay (stacked renders will be more intense)
423
+
-[ ] Investigate components (UI allowlist)
424
+
-[ ] UI for turning on/off options
425
+
-[ ] “PageSpeed insights” for React
420
426
-[ ] React Native support
421
427
-[ ] Name / explain the actual problem, docs
422
428
-[ ] Simple FPS counter
423
429
-[ ] Drag and select areas of the screen to scan
424
430
-[ ] Long task progress bar filter
431
+
-[x] Report should include all renders
432
+
-[ ][Runtime version guarding](https://github.com/lahmatiy/react-render-tracker/blob/229ad0e9c28853615300724d5dc86c140f250f60/src/publisher/react-integration/utils/getInternalReactConstants.ts#L28)
433
+
-[ ] React as peer dependency (lock version to range)
425
434
-[ ] Add a funny mascot, like the ["Stop I'm Changing" dude](https://www.youtube.com/shorts/FwOZdX7bDKI?app=desktop)
0 commit comments