Commit 1e8f15f
committed
fix[devtools/inspectElement]: dont pause initial inspectElement call when user switches tabs (#27488)
There are not so many changes, most of them are changing imports,
because I've moved types for UI in a single file.
In #27357 I've added support for
pausing polling events: when user inspects an element, we start polling
React DevTools backend for updates in props / state. If user switches
tabs, extension's service worker can be killed by browser and this
polling will start spamming errors.
What I've missed is that we also have a separate call for this API, but
which is executed only once when user selects an element. We don't
handle promise rejection here and this can lead to some errors when user
selects an element and switches tabs right after it.
The only change here is that this API now has
`shouldListenToPauseEvents` param, which is `true` for polling, so we
will pause polling once user switches tabs. It is `false` by default, so
we won't pause initial call by accident.
https://github.com/hoxyq/react/blob/af8beeebf63b5824497fcd0bb35b7c0ac8fe60a0/packages/react-devtools-shared/src/backendAPI.js#L96
DiffTrain build for commit 77ec618.1 parent a19627e commit 1e8f15f
File tree
7 files changed
+9
-9
lines changed- compiled-rn/facebook-fbsource/xplat/js
- RKJSModules/vendor
- react-test-renderer/cjs
- react/cjs
- react-native-github/Libraries/Renderer
7 files changed
+9
-9
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24773 | 24773 | | |
24774 | 24774 | | |
24775 | 24775 | | |
24776 | | - | |
| 24776 | + | |
24777 | 24777 | | |
24778 | 24778 | | |
24779 | 24779 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8978 | 8978 | | |
8979 | 8979 | | |
8980 | 8980 | | |
8981 | | - | |
| 8981 | + | |
8982 | 8982 | | |
8983 | 8983 | | |
8984 | 8984 | | |
| |||
9009 | 9009 | | |
9010 | 9010 | | |
9011 | 9011 | | |
9012 | | - | |
| 9012 | + | |
9013 | 9013 | | |
9014 | 9014 | | |
9015 | 9015 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9404 | 9404 | | |
9405 | 9405 | | |
9406 | 9406 | | |
9407 | | - | |
| 9407 | + | |
9408 | 9408 | | |
9409 | 9409 | | |
9410 | 9410 | | |
| |||
9435 | 9435 | | |
9436 | 9436 | | |
9437 | 9437 | | |
9438 | | - | |
| 9438 | + | |
9439 | 9439 | | |
9440 | 9440 | | |
9441 | 9441 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
616 | 616 | | |
617 | 617 | | |
618 | 618 | | |
619 | | - | |
| 619 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
622 | | - | |
| 622 | + | |
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments