Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-dom/server-rendering-stub: restore experimental prefix for useFormState and useFormStatus #27470

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

gnoff
Copy link
Collaborator

@gnoff gnoff commented Oct 5, 2023

in #27461 the experimental prefix was added back for useFormState and useFormStatus in react-dom. However these functions are also exported from the server rendering stub too and when using the stub with experimental prefixes their absence causes unexpected errors.

This change adds back the experimental prefix for these two hooks to match the experimental build of react-dom.

…g from the server rendering stub. This adds them back in.
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Oct 5, 2023
@react-sizebot
Copy link

Comparing: 16619f1...97db203

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.min.js = 174.46 kB 174.46 kB = 54.27 kB 54.27 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 176.31 kB 176.31 kB = 54.88 kB 54.88 kB
facebook-www/ReactDOM-prod.classic.js = 564.48 kB 564.48 kB = 99.37 kB 99.37 kB
facebook-www/ReactDOM-prod.modern.js = 548.21 kB 548.21 kB = 96.44 kB 96.44 kB
oss-experimental/react-dom/cjs/react-dom-server-rendering-stub.development.js +7,457.15% 17.21 kB 1,300.59 kB +7,003.09% 4.04 kB 287.11 kB
oss-experimental/react-dom/umd/react-dom-server-rendering-stub.development.js +7,441.42% 18.09 kB 1,364.02 kB +6,875.68% 4.16 kB 290.26 kB
oss-stable-semver/react-dom/cjs/react-dom-server-rendering-stub.development.js +7,406.17% 17.18 kB 1,289.41 kB +7,006.93% 4.01 kB 285.13 kB
oss-stable/react-dom/cjs/react-dom-server-rendering-stub.development.js +7,394.98% 17.20 kB 1,289.44 kB +6,959.99% 4.04 kB 285.15 kB
oss-stable-semver/react-dom/umd/react-dom-server-rendering-stub.development.js +7,389.56% 18.06 kB 1,352.24 kB +6,873.77% 4.13 kB 288.16 kB
oss-stable/react-dom/umd/react-dom-server-rendering-stub.development.js +7,378.93% 18.08 kB 1,352.27 kB +6,829.19% 4.16 kB 288.19 kB
oss-experimental/react-dom/cjs/react-dom-server-rendering-stub.production.min.js +5,016.83% 3.34 kB 170.85 kB +4,297.20% 1.21 kB 53.34 kB
oss-stable-semver/react-dom/cjs/react-dom-server-rendering-stub.production.min.js +5,013.46% 3.31 kB 169.10 kB +4,356.08% 1.18 kB 52.76 kB
oss-stable/react-dom/cjs/react-dom-server-rendering-stub.production.min.js +4,975.91% 3.33 kB 169.18 kB +4,266.09% 1.21 kB 52.79 kB
oss-experimental/react-dom/umd/react-dom-server-rendering-stub.production.min.js +4,715.77% 3.54 kB 170.67 kB +3,945.02% 1.32 kB 53.56 kB
oss-stable-semver/react-dom/umd/react-dom-server-rendering-stub.production.min.js +4,709.54% 3.51 kB 168.91 kB +4,000.70% 1.29 kB 53.06 kB
oss-stable/react-dom/umd/react-dom-server-rendering-stub.production.min.js +4,676.40% 3.54 kB 168.99 kB +3,922.05% 1.32 kB 53.09 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-dom/cjs/react-dom-server-rendering-stub.development.js +7,457.15% 17.21 kB 1,300.59 kB +7,003.09% 4.04 kB 287.11 kB
oss-experimental/react-dom/umd/react-dom-server-rendering-stub.development.js +7,441.42% 18.09 kB 1,364.02 kB +6,875.68% 4.16 kB 290.26 kB
oss-stable-semver/react-dom/cjs/react-dom-server-rendering-stub.development.js +7,406.17% 17.18 kB 1,289.41 kB +7,006.93% 4.01 kB 285.13 kB
oss-stable/react-dom/cjs/react-dom-server-rendering-stub.development.js +7,394.98% 17.20 kB 1,289.44 kB +6,959.99% 4.04 kB 285.15 kB
oss-stable-semver/react-dom/umd/react-dom-server-rendering-stub.development.js +7,389.56% 18.06 kB 1,352.24 kB +6,873.77% 4.13 kB 288.16 kB
oss-stable/react-dom/umd/react-dom-server-rendering-stub.development.js +7,378.93% 18.08 kB 1,352.27 kB +6,829.19% 4.16 kB 288.19 kB
oss-experimental/react-dom/cjs/react-dom-server-rendering-stub.production.min.js +5,016.83% 3.34 kB 170.85 kB +4,297.20% 1.21 kB 53.34 kB
oss-stable-semver/react-dom/cjs/react-dom-server-rendering-stub.production.min.js +5,013.46% 3.31 kB 169.10 kB +4,356.08% 1.18 kB 52.76 kB
oss-stable/react-dom/cjs/react-dom-server-rendering-stub.production.min.js +4,975.91% 3.33 kB 169.18 kB +4,266.09% 1.21 kB 52.79 kB
oss-experimental/react-dom/umd/react-dom-server-rendering-stub.production.min.js +4,715.77% 3.54 kB 170.67 kB +3,945.02% 1.32 kB 53.56 kB
oss-stable-semver/react-dom/umd/react-dom-server-rendering-stub.production.min.js +4,709.54% 3.51 kB 168.91 kB +4,000.70% 1.29 kB 53.06 kB
oss-stable/react-dom/umd/react-dom-server-rendering-stub.production.min.js +4,676.40% 3.54 kB 168.99 kB +3,922.05% 1.32 kB 53.09 kB

Generated by 🚫 dangerJS against 97db203

@gnoff gnoff merged commit 546178f into facebook:main Oct 5, 2023
36 checks passed
@gnoff gnoff deleted the fix-experimental-stub branch October 5, 2023 15:53
Umeshmalik pushed a commit to Umeshmalik/react that referenced this pull request Oct 8, 2023
…seFormState` and `useFormStatus` (facebook#27470)

in facebook#27461 the experimental prefix was added back for `useFormState` and
`useFormStatus` in react-dom. However these functions are also exported
from the server rendering stub too and when using the stub with
experimental prefixes their absence causes unexpected errors.

This change adds back the experimental prefix for these two hooks to
match the experimental build of react-dom.
alunyov pushed a commit to alunyov/react that referenced this pull request Oct 11, 2023
…seFormState` and `useFormStatus` (facebook#27470)

in facebook#27461 the experimental prefix was added back for `useFormState` and
`useFormStatus` in react-dom. However these functions are also exported
from the server rendering stub too and when using the stub with
experimental prefixes their absence causes unexpected errors.

This change adds back the experimental prefix for these two hooks to
match the experimental build of react-dom.
ztanner added a commit to vercel/next.js that referenced this pull request Oct 16, 2023
…experimental prefix for server action APIs (#56809)

The latest React canary builds have a few changes that need to be
adopted for compatability.

1. the `useFormState` and `useFormStatus` hooks in `react-dom` and the
`formData` opiont in `react-dom/server` are no longer prefixed with
`experimental_`
2. server content (an undocumented React feature) has been removed. Next
only had trivial intenral use of this API and did not expose a coherent
feature to Next users (no ability to seed context on refetches). It is
still possible that some users used the React server context APIs which
is why this should go into Next 14.

### React upstream changes

- facebook/react#27513
- facebook/react#27514
- facebook/react#27511
- facebook/react#27508
- facebook/react#27502
- facebook/react#27474
- facebook/react#26789
- facebook/react#27500
- facebook/react#27488
- facebook/react#27458
- facebook/react#27471
- facebook/react#27470
- facebook/react#27464
- facebook/react#27456
- facebook/react#27462
- facebook/react#27461
- facebook/react#27460
- facebook/react#27459
- facebook/react#27454
- facebook/react#27457
- facebook/react#27453
- facebook/react#27401
- facebook/react#27443
- facebook/react#27445
- facebook/react#27364
- facebook/react#27440
- facebook/react#27436

---------

Co-authored-by: Zack Tanner <zacktanner@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Jiachi Liu <inbox@huozhi.im>
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
…seFormState` and `useFormStatus` (facebook#27470)

in facebook#27461 the experimental prefix was added back for `useFormState` and
`useFormStatus` in react-dom. However these functions are also exported
from the server rendering stub too and when using the stub with
experimental prefixes their absence causes unexpected errors.

This change adds back the experimental prefix for these two hooks to
match the experimental build of react-dom.
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
…seFormState` and `useFormStatus` (#27470)

in #27461 the experimental prefix was added back for `useFormState` and
`useFormStatus` in react-dom. However these functions are also exported
from the server rendering stub too and when using the stub with
experimental prefixes their absence causes unexpected errors.

This change adds back the experimental prefix for these two hooks to
match the experimental build of react-dom.

DiffTrain build for commit 546178f.
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.

None yet

5 participants