Commit d6ea30e
committed
[react] Remove Readonly<P> from class component constructor
This was added in 542f3c0
without adding tests validating the behavior.
It certainly doesn't work anymore since the added tests also passed with `Readonly<P>`.
Maybe it did work but then the change will almost certainly be marked as working as intended.
So I just remove it now since a lot of the ecosystem have inlined their own class component constructor without Readonly<P> that matches the legacy context constructur signature.
Legacy context will be removed in React 19 so we would break a lot of existing code for a feature that doesn't even work.1 parent 12df4a5 commit d6ea30e
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
995 | 995 | | |
996 | 996 | | |
997 | 997 | | |
998 | | - | |
| 998 | + | |
999 | 999 | | |
1000 | 1000 | | |
1001 | 1001 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
996 | 996 | | |
997 | 997 | | |
998 | 998 | | |
999 | | - | |
| 999 | + | |
1000 | 1000 | | |
1001 | 1001 | | |
1002 | 1002 | | |
| |||
0 commit comments