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

Bugfix: Dropped effects in Legacy Mode Suspense #18238

Merged
merged 2 commits into from
Mar 6, 2020

Conversation

acdlite
Copy link
Collaborator

@acdlite acdlite commented Mar 6, 2020

In legacy mode, a component that suspends bails out and commit in its previous state. If the component previously had mounted effects, we must transfer those to the work-in-progress so they don't get dropped.

Bug report: https://codesandbox.io/s/charming-almeida-k6tdv

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Mar 6, 2020
@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 6, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3d0cfef:

Sandbox Source
great-visvesvaraya-ej9lk Configuration
infallible-curran-fgp83 PR

In legacy mode, a component that suspends bails out and commit in
its previous state. If the component previously had mounted effects,
we must transfer those to the work-in-progress so they don't
get dropped.
@acdlite acdlite force-pushed the bugfix-legacy-suspense-effect branch from 4ddf4a5 to 3d0cfef Compare March 6, 2020 18:47
@sizebot
Copy link

sizebot commented Mar 6, 2020

Details of bundled changes.

Comparing: 115cd12...3d0cfef

react-noop-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-noop-renderer-flight-client.production.min.js 0.0% -0.3% 513 B 513 B 379 B 378 B NODE_PROD
react-noop-renderer.development.js +2.4% +0.5% 29.28 KB 29.98 KB 5.76 KB 5.79 KB NODE_DEV
react-noop-renderer.production.min.js 🔺+2.7% 🔺+0.9% 12 KB 12.33 KB 3.57 KB 3.61 KB NODE_PROD
react-noop-renderer-server.development.js 0.0% -0.3% 1.59 KB 1.59 KB 749 B 747 B NODE_DEV
react-noop-renderer-server.production.min.js 0.0% -0.4% 840 B 840 B 472 B 470 B NODE_PROD
react-noop-renderer-flight-client.development.js 0.0% -0.3% 1.18 KB 1.18 KB 616 B 614 B NODE_DEV
react-noop-renderer-persistent.development.js +2.0% +0.2% 29.33 KB 29.92 KB 5.78 KB 5.79 KB NODE_DEV
react-noop-renderer-persistent.production.min.js 🔺+2.3% 🔺+0.6% 12.02 KB 12.3 KB 3.58 KB 3.6 KB NODE_PROD
react-noop-renderer-flight-server.development.js 0.0% -0.2% 1.73 KB 1.73 KB 803 B 801 B NODE_DEV
react-noop-renderer-flight-server.production.min.js 0.0% -0.4% 946 B 946 B 526 B 524 B NODE_PROD

Size changes (stable)

Generated by 🚫 dangerJS against 3d0cfef

@sizebot
Copy link

sizebot commented Mar 6, 2020

Details of bundled changes.

Comparing: 115cd12...3d0cfef

react-noop-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-noop-renderer-flight-server.development.js 0.0% -0.2% 1.75 KB 1.75 KB 813 B 811 B NODE_DEV
react-noop-renderer-flight-server.production.min.js 0.0% -0.4% 959 B 959 B 536 B 534 B NODE_PROD
react-noop-renderer-server.development.js 0.0% -0.1% 1.61 KB 1.61 KB 757 B 756 B NODE_DEV
react-noop-renderer-server.production.min.js 0.0% -0.2% 853 B 853 B 480 B 479 B NODE_PROD
react-noop-renderer-persistent.development.js +2.0% +0.2% 29.34 KB 29.93 KB 5.78 KB 5.8 KB NODE_DEV
react-noop-renderer-persistent.production.min.js 🔺+2.3% 🔺+0.5% 12.04 KB 12.31 KB 3.59 KB 3.61 KB NODE_PROD
react-noop-renderer.development.js +2.4% +0.5% 29.3 KB 29.99 KB 5.77 KB 5.8 KB NODE_DEV
react-noop-renderer-flight-client.development.js 0.0% -0.3% 1.2 KB 1.2 KB 625 B 623 B NODE_DEV
react-noop-renderer.production.min.js 🔺+2.7% 🔺+0.9% 12.01 KB 12.34 KB 3.58 KB 3.61 KB NODE_PROD
react-noop-renderer-flight-client.production.min.js 0.0% -0.5% 526 B 526 B 388 B 386 B NODE_PROD

Size changes (experimental)

Generated by 🚫 dangerJS against 3d0cfef

@acdlite acdlite merged commit 235a6c4 into facebook:master Mar 6, 2020
acdlite added a commit to acdlite/react that referenced this pull request Mar 19, 2020
* Failing: Dropped effects in Legacy Mode Suspense

* Transfer mounted effects on suspend in legacy mode

In legacy mode, a component that suspends bails out and commit in
its previous state. If the component previously had mounted effects,
we must transfer those to the work-in-progress so they don't
get dropped.
@acdlite acdlite mentioned this pull request Mar 19, 2020
1 task
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