Skip to content

[Flight] Unwrap lazy before reading the value#30938

Merged
sebmarkbage merged 1 commit into
react:mainfrom
sebmarkbage:flightfixunwraplazy
Sep 10, 2024
Merged

[Flight] Unwrap lazy before reading the value#30938
sebmarkbage merged 1 commit into
react:mainfrom
sebmarkbage:flightfixunwraplazy

Conversation

@sebmarkbage

@sebmarkbage sebmarkbage commented Sep 10, 2024

Copy link
Copy Markdown
Contributor

This is important if the lazy is at the root of the chunk. I don't have a unit test for it but @gnoff has a repro.

It also shouldn't unwrap the last value since that's the one we're referencing.

This was already done correctly by @unstubbable in waitForReference so this just aligns with that.

This is important if the lazy is at the root of the chunk.
@sebmarkbage sebmarkbage requested a review from gnoff September 10, 2024 21:16
@vercel

vercel Bot commented Sep 10, 2024

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 10, 2024 9:18pm

@react-sizebot

Copy link
Copy Markdown

Comparing: a5a7f1063e6f190c64c779b2aa54d28fb7b92cfb...80f40b1ff329a56f32149dc94fb61123b301ef65

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.82 kB 1.82 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 505.22 kB 505.22 kB = 90.29 kB 90.29 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB +0.05% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 512.56 kB 512.56 kB = 91.52 kB 91.52 kB
facebook-www/ReactDOM-prod.classic.js = 600.88 kB 600.88 kB = 106.29 kB 106.29 kB
facebook-www/ReactDOM-prod.modern.js = 577.17 kB 577.17 kB = 102.43 kB 102.43 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against ef231d1

@sebmarkbage sebmarkbage merged commit bac33d1 into react:main Sep 10, 2024
gnoff pushed a commit to vercel/next.js that referenced this pull request Sep 12, 2024
**breaking change for canary users: Bumps peer dependency of React from
`19.0.0-rc-7771d3a7-20240827` to `19.0.0-rc-94e652d5-20240912`**

[diff
react/react@7771d3a7...94e652d5](react/react@7771d3a...94e652d)

<details>
<summary>React upstream changes</summary>

- react/react#30952
- react/react#30950
- react/react#30946
- react/react#30934
- react/react#30947
- react/react#30945
- react/react#30938
- react/react#30936
- react/react#30879
- react/react#30888
- react/react#30931
- react/react#30930
- react/react#30832
- react/react#30929
- react/react#30926
- react/react#30925
- react/react#30905
- react/react#30900
- react/react#30910
- react/react#30906
- react/react#30899
- react/react#30919
- react/react#30708
- react/react#30907
- react/react#30897
- react/react#30896
- react/react#30895
- react/react#30887
- react/react#30889
- react/react#30893
- react/react#30892
- react/react#30891
- react/react#30882
- react/react#30881
- react/react#30870
- react/react#30849
- react/react#30878
- react/react#30865
- react/react#30869
- react/react#30875
- react/react#30800
- react/react#30762
- react/react#30831
- react/react#30866
- react/react#30853
- react/react#30850
- react/react#30847
- react/react#30842
- react/react#30837
- react/react#30848
- react/react#30844
- react/react#30839
- react/react#30802
- react/react#30841
- react/react#30827
- react/react#30826
- react/react#30825
- react/react#30824
- react/react#30840
- react/react#30838
- react/react#30836
- react/react#30819
- react/react#30816
- react/react#30814
- react/react#30813
- react/react#30812
- react/react#30811

</details>

---------

Co-authored-by: vercel-release-bot <infra+release@vercel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants