Skip to content

Class component can suspend without losing state outside concurrent mode#13899

Merged
acdlite merged 1 commit intofacebook:masterfrom
acdlite:suspending-class-mount
Oct 20, 2018
Merged

Class component can suspend without losing state outside concurrent mode#13899
acdlite merged 1 commit intofacebook:masterfrom
acdlite:suspending-class-mount

Conversation

@acdlite
Copy link
Collaborator

@acdlite acdlite commented Oct 20, 2018

Outside of concurrent mode, schedules a force update on a suspended class component to force it to prevent it from bailing out and reusing the current fiber, which we know to be inconsistent.

Outside of concurrent mode, schedules a force update on a suspended
class component to force it to prevent it from bailing out and
reusing the current fiber, which we know to be inconsistent.
@sizebot
Copy link

sizebot commented Oct 20, 2018

ReactDOM: size: 🔺+0.1%, gzip: 0.0%

Details of bundled changes.

Comparing: 36db538...ccb365f

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.development.js +0.1% +0.1% 677.65 KB 678.32 KB 157.4 KB 157.53 KB UMD_DEV
react-dom.production.min.js 🔺+0.1% 0.0% 97.7 KB 97.8 KB 31.89 KB 31.9 KB UMD_PROD
react-dom.development.js +0.1% +0.1% 672.99 KB 673.66 KB 155.99 KB 156.12 KB NODE_DEV
react-dom.production.min.js 🔺+0.1% 0.0% 97.72 KB 97.82 KB 31.44 KB 31.46 KB NODE_PROD
ReactDOM-dev.js +0.1% +0.1% 690.96 KB 691.62 KB 156.69 KB 156.81 KB FB_WWW_DEV
ReactDOM-prod.js -0.0% 🔺+0.2% 295.71 KB 295.7 KB 53.93 KB 54.05 KB FB_WWW_PROD
react-dom.profiling.min.js +0.1% +0.1% 100.12 KB 100.22 KB 31.8 KB 31.81 KB NODE_PROFILING
ReactDOM-profiling.js 0.0% +0.3% 300.1 KB 300.11 KB 54.97 KB 55.11 KB FB_WWW_PROFILING
react-dom.profiling.min.js +0.1% +0.1% 100.05 KB 100.15 KB 32.29 KB 32.31 KB UMD_PROFILING

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-art.development.js +0.1% +0.1% 465.11 KB 465.77 KB 103.22 KB 103.33 KB UMD_DEV
react-art.production.min.js 🔺+0.1% 🔺+0.2% 89.65 KB 89.75 KB 27.5 KB 27.57 KB UMD_PROD
react-art.development.js +0.2% +0.1% 396.88 KB 397.55 KB 86.11 KB 86.23 KB NODE_DEV
react-art.production.min.js 🔺+0.2% 🔺+0.1% 54.62 KB 54.72 KB 16.79 KB 16.81 KB NODE_PROD
ReactART-dev.js +0.2% +0.1% 401.22 KB 401.88 KB 84.57 KB 84.67 KB FB_WWW_DEV
ReactART-prod.js -0.0% 🔺+0.4% 168.85 KB 168.84 KB 28.26 KB 28.37 KB FB_WWW_PROD

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js +0.2% +0.1% 410.35 KB 411.02 KB 88.94 KB 89.06 KB UMD_DEV
react-test-renderer.production.min.js 🔺+0.2% 🔺+0.1% 56.09 KB 56.19 KB 17.17 KB 17.2 KB UMD_PROD
react-test-renderer.development.js +0.2% +0.1% 405.92 KB 406.59 KB 87.84 KB 87.96 KB NODE_DEV
react-test-renderer.production.min.js 🔺+0.2% 🔺+0.1% 55.8 KB 55.9 KB 16.97 KB 16.99 KB NODE_PROD
ReactTestRenderer-dev.js +0.2% +0.1% 410.6 KB 411.26 KB 86.65 KB 86.77 KB FB_WWW_DEV

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler.development.js +0.2% +0.1% 394.58 KB 395.25 KB 84.54 KB 84.67 KB NODE_DEV
react-reconciler.production.min.js 🔺+0.2% 🔺+0.1% 55.68 KB 55.78 KB 16.61 KB 16.63 KB NODE_PROD
react-reconciler-persistent.development.js +0.2% +0.1% 393.18 KB 393.86 KB 83.99 KB 84.11 KB NODE_DEV
react-reconciler-persistent.production.min.js 🔺+0.2% 🔺+0.1% 55.7 KB 55.79 KB 16.62 KB 16.63 KB NODE_PROD

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-dev.js +0.1% +0.1% 527.82 KB 528.48 KB 115.52 KB 115.66 KB RN_FB_DEV
ReactNativeRenderer-prod.js -0.0% 🔺+0.3% 223.66 KB 223.65 KB 38.59 KB 38.71 KB RN_FB_PROD
ReactNativeRenderer-dev.js +0.1% +0.1% 527.53 KB 528.19 KB 115.44 KB 115.58 KB RN_OSS_DEV
ReactNativeRenderer-prod.js -0.0% 🔺+0.3% 223.67 KB 223.67 KB 38.59 KB 38.71 KB RN_OSS_PROD
ReactFabric-dev.js +0.1% +0.1% 518.04 KB 518.7 KB 113.09 KB 113.23 KB RN_FB_DEV
ReactFabric-prod.js -0.0% 🔺+0.3% 218.24 KB 218.23 KB 37.31 KB 37.43 KB RN_FB_PROD
ReactFabric-dev.js +0.1% +0.1% 518.08 KB 518.74 KB 113.11 KB 113.25 KB RN_OSS_DEV
ReactFabric-prod.js -0.0% 🔺+0.3% 218.27 KB 218.27 KB 37.32 KB 37.45 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js 0.0% +0.3% 229.25 KB 229.27 KB 39.95 KB 40.09 KB RN_OSS_PROFILING
ReactFabric-profiling.js 0.0% +0.4% 223 KB 223.01 KB 38.61 KB 38.75 KB RN_OSS_PROFILING
ReactNativeRenderer-profiling.js 0.0% +0.3% 229.24 KB 229.25 KB 39.95 KB 40.08 KB RN_FB_PROFILING
ReactFabric-profiling.js 0.0% +0.4% 222.96 KB 222.97 KB 38.6 KB 38.73 KB RN_FB_PROFILING

scheduler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
scheduler.development.js n/a n/a 0 B 19.17 KB 0 B 5.74 KB UMD_DEV
scheduler.production.min.js n/a n/a 0 B 3.16 KB 0 B 1.53 KB UMD_PROD

Generated by 🚫 dangerJS

@acdlite acdlite force-pushed the suspending-class-mount branch from ed79bfd to ccb365f Compare October 20, 2018 01:41
@acdlite acdlite merged commit 0fc0446 into facebook:master Oct 20, 2018
if (current !== null) {
// An class component without an instance only mounts if it suspended
// inside a non- concurrent tree, in an inconsistent state. We want to
// tree it like a new mount, even though an empty version of it already
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/tree it/treat it/ 😄

linjiajian999 pushed a commit to linjiajian999/react that referenced this pull request Oct 22, 2018
…ode (facebook#13899)

Outside of concurrent mode, schedules a force update on a suspended
class component to force it to prevent it from bailing out and
reusing the current fiber, which we know to be inconsistent.
jetoneza pushed a commit to jetoneza/react that referenced this pull request Jan 23, 2019
…ode (facebook#13899)

Outside of concurrent mode, schedules a force update on a suspended
class component to force it to prevent it from bailing out and
reusing the current fiber, which we know to be inconsistent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants