Sebastian Markbåge and GitHub
9be531cd37
[Fiber] Treat unwrapping React.lazy more like a use() ( #34031 )
...
While we want to get rid of React.lazy's special wrapper type and just
use a Promise for the type, we still have the wrapper.
However, this is still conceptually the same as a Usable in that it
should be have the same if you `use(promise)` or render a Promise as a
child or type position.
This PR makes it behave like a `use()` when we unwrap them. We could
move to a model where it actually reaches the internal of the Lazy's
Promise when it unwraps but for now I leave the lazy API signature
intact by just catching the Promise and then "use()" that.
This lets us align on the semantics with `use()` such as the suspense
yield optimization. It also lets us warn or fork based on legacy
throw-a-Promise behavior where as `React.lazy` is not deprecated.
2025-07-29 11:50:12 -04:00
..
2022-10-18 11:19:24 -04:00
2025-07-29 11:50:12 -04:00
2025-05-06 00:23:27 -04:00
2022-10-18 11:19:24 -04:00
2025-06-11 12:08:04 -04:00
2024-10-28 13:59:38 -07:00
2025-07-29 11:50:12 -04:00
2025-03-04 12:34:34 -05:00
2024-04-08 08:53:17 -07:00
2025-06-16 12:22:47 -04:00
2024-04-08 19:23:23 -04:00
2025-04-22 21:00:30 -04:00
2025-04-11 10:54:06 -04:00
2025-05-13 16:10:28 -04:00
2025-06-17 17:04:40 -04:00
2025-07-29 11:50:12 -04:00
2024-12-15 12:34:08 -05:00
2025-07-01 18:06:26 +01:00
2025-07-02 10:45:37 -04:00
2024-12-18 17:51:12 -05:00
2025-07-02 10:45:37 -04:00
2025-05-21 15:47:47 -04:00
2025-04-11 10:54:06 -04:00
2025-07-16 18:09:35 +01:00
2025-06-23 17:21:18 -04:00
2025-07-24 13:33:03 -04:00
2025-04-09 22:22:45 -04:00
2023-04-10 14:58:44 -07:00
2025-05-06 00:23:27 -04:00
2023-04-10 14:58:44 -07:00
2025-04-01 11:43:33 -04:00
2023-04-10 14:58:44 -07:00
2023-04-10 14:58:44 -07:00
2023-04-10 14:58:44 -07:00
2025-01-28 22:42:50 -08:00
2023-04-10 14:58:44 -07:00
2025-02-24 10:00:22 -05:00
2025-04-09 22:44:44 -04:00
2025-03-04 12:34:34 -05:00
2025-05-06 00:10:05 -04:00
2025-04-01 12:08:55 -04:00
2023-10-15 12:29:52 -04:00
2025-06-16 12:22:47 -04:00
2024-12-13 13:58:18 -05:00
2025-06-23 17:21:18 -04:00
2025-07-07 13:57:51 -04:00
2025-04-22 19:44:14 -04:00
2025-05-13 15:45:11 -04:00
2025-06-23 17:21:18 -04:00
2025-05-13 15:45:11 -04:00
2025-06-11 11:53:04 -04:00
2025-04-09 22:22:45 -04:00
2025-07-25 12:32:30 +02:00
2025-06-23 17:21:18 -04:00
2025-05-13 15:45:11 -04:00
2025-05-13 16:10:28 -04:00
2025-06-11 11:53:04 -04:00
2022-12-01 23:19:13 -05:00
2025-06-23 20:07:04 -04:00
2025-06-09 19:37:49 -04:00
2025-04-22 21:00:30 -04:00
2025-07-29 11:50:12 -04:00
2025-04-22 21:00:30 -04:00
2025-04-09 22:22:45 -04:00
2025-04-01 12:11:19 -04:00
2025-04-01 12:11:19 -04:00
2022-12-01 23:19:13 -05:00
2025-05-07 12:47:28 -04:00
2025-06-23 17:21:18 -04:00
2025-06-03 11:30:17 -04:00
2025-07-01 15:52:56 -04:00
2022-10-18 11:19:24 -04:00
2025-07-24 13:33:03 -04:00
2022-10-18 11:19:24 -04:00
2023-04-10 14:58:44 -07:00
2025-04-29 22:17:17 -04:00
2024-04-08 08:53:17 -07:00
2022-10-18 11:19:24 -04:00
2024-05-25 11:58:40 -04:00
2024-10-21 16:17:41 -07:00
2025-06-16 12:22:47 -04:00
2025-03-17 09:17:00 -04:00
2023-03-06 11:09:07 -05:00