Commit 0cf92e7
committed
[compiler] Allow extraneous non-reactive locals (#35190)
The existing exhaustive-deps rule allows omitting non-reactive
dependencies, even if they're not memoized. Conceptually, if a value is
non-reactive then it cannot semantically change. Even if the value is a
new object, that object represents the exact same value and doesn't
necessitate redoing downstream computation. Thus its fine to exclude
nonreactive dependencies, whether they're a stable type or not.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/35190).
* #35201
* #35202
* #35192
* __->__ #35190
DiffTrain build for [67c1487](67c1487)1 parent 7c9db67 commit 0cf92e7
File tree
35 files changed
+88
-92
lines changed- compiled
- eslint-plugin-react-hooks
- facebook-www
35 files changed
+88
-92
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53578 | 53578 | | |
53579 | 53579 | | |
53580 | 53580 | | |
53581 | | - | |
53582 | | - | |
| 53581 | + | |
53583 | 53582 | | |
53584 | 53583 | | |
53585 | 53584 | | |
| |||
53605 | 53604 | | |
53606 | 53605 | | |
53607 | 53606 | | |
53608 | | - | |
53609 | | - | |
53610 | | - | |
53611 | | - | |
| 53607 | + | |
53612 | 53608 | | |
53613 | 53609 | | |
53614 | 53610 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1499 | 1499 | | |
1500 | 1500 | | |
1501 | 1501 | | |
1502 | | - | |
| 1502 | + | |
1503 | 1503 | | |
1504 | 1504 | | |
1505 | 1505 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1499 | 1499 | | |
1500 | 1500 | | |
1501 | 1501 | | |
1502 | | - | |
| 1502 | + | |
1503 | 1503 | | |
1504 | 1504 | | |
1505 | 1505 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
609 | | - | |
| 609 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
609 | | - | |
| 609 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
613 | | - | |
| 613 | + | |
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
613 | | - | |
| 613 | + | |
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20468 | 20468 | | |
20469 | 20469 | | |
20470 | 20470 | | |
20471 | | - | |
| 20471 | + | |
20472 | 20472 | | |
20473 | 20473 | | |
20474 | | - | |
| 20474 | + | |
20475 | 20475 | | |
20476 | 20476 | | |
20477 | 20477 | | |
| |||
20506 | 20506 | | |
20507 | 20507 | | |
20508 | 20508 | | |
20509 | | - | |
| 20509 | + | |
20510 | 20510 | | |
20511 | 20511 | | |
20512 | 20512 | | |
| |||
0 commit comments