Commit 6b4c031
committed
Check thenable instead of thenableState
Now that hook state is preserved while the work loop is suspended, we
don't need to track the thenable state in the work loop. We can track
it alongside the rest of the hook state.
Before deleting the thenable state variable from the work loop, I need
to remove the other places where it's referenced.
One of them is `isThenableStateResolved`. This grabs the last thenable
from the array and checks if it has resolved.
This was a pointless indirection anyway. The thenable is already stored
as `workInProgressThrownValue`. So we can check that directly.1 parent 33e3d28 commit 6b4c031
File tree
4 files changed
+18
-32
lines changed- packages/react-reconciler/src
4 files changed
+18
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
64 | 60 | | |
65 | 61 | | |
66 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
64 | 60 | | |
65 | 61 | | |
66 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| |||
2204 | 2204 | | |
2205 | 2205 | | |
2206 | 2206 | | |
| 2207 | + | |
2207 | 2208 | | |
2208 | 2209 | | |
2209 | | - | |
| 2210 | + | |
2210 | 2211 | | |
2211 | 2212 | | |
2212 | 2213 | | |
2213 | | - | |
2214 | | - | |
2215 | | - | |
2216 | | - | |
2217 | | - | |
| 2214 | + | |
2218 | 2215 | | |
2219 | 2216 | | |
2220 | 2217 | | |
2221 | 2218 | | |
2222 | 2219 | | |
2223 | 2220 | | |
2224 | | - | |
2225 | 2221 | | |
2226 | 2222 | | |
2227 | 2223 | | |
| |||
2246 | 2242 | | |
2247 | 2243 | | |
2248 | 2244 | | |
2249 | | - | |
| 2245 | + | |
| 2246 | + | |
2250 | 2247 | | |
2251 | 2248 | | |
2252 | 2249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| |||
2204 | 2204 | | |
2205 | 2205 | | |
2206 | 2206 | | |
| 2207 | + | |
2207 | 2208 | | |
2208 | 2209 | | |
2209 | | - | |
| 2210 | + | |
2210 | 2211 | | |
2211 | 2212 | | |
2212 | 2213 | | |
2213 | | - | |
2214 | | - | |
2215 | | - | |
2216 | | - | |
2217 | | - | |
| 2214 | + | |
2218 | 2215 | | |
2219 | 2216 | | |
2220 | 2217 | | |
2221 | 2218 | | |
2222 | 2219 | | |
2223 | 2220 | | |
2224 | | - | |
2225 | 2221 | | |
2226 | 2222 | | |
2227 | 2223 | | |
| |||
2246 | 2242 | | |
2247 | 2243 | | |
2248 | 2244 | | |
2249 | | - | |
| 2245 | + | |
| 2246 | + | |
2250 | 2247 | | |
2251 | 2248 | | |
2252 | 2249 | | |
| |||
0 commit comments