Skip to content

Conversation

@gaearon
Copy link
Collaborator

@gaearon gaearon commented Aug 19, 2019

This adds a throw for suspending outside of Suspense, equivalent to what we do on the client side.

'\n' +
'Add a <Suspense fallback=...> component higher in the tree to ' +
'provide a loading indicator or placeholder to display.',
);
Copy link
Collaborator

@sebmarkbage sebmarkbage Aug 19, 2019

Choose a reason for hiding this comment

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

Shouldn't we also throw a nicer error than the Promise if we don't have enableSuspenseServerRenderer on?

@sizebot
Copy link

sizebot commented Aug 19, 2019

ReactDOM: size: 🔺+0.3%, gzip: 🔺+0.3%

Details of bundled changes.

Comparing: e89c19d...13395e6

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.profiling.min.js 0.0% 0.0% 115.03 KB 115.03 KB 36.28 KB 36.29 KB NODE_PROFILING
react-dom-server.browser.development.js +0.5% +0.4% 140.04 KB 140.8 KB 36.79 KB 36.92 KB UMD_DEV
react-dom-server.browser.production.min.js 🔺+0.3% 🔺+0.3% 19.68 KB 19.74 KB 7.32 KB 7.34 KB UMD_PROD
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 3.78 KB 3.78 KB 1.53 KB 1.53 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% 🔺+0.1% 11.2 KB 11.2 KB 4.15 KB 4.15 KB UMD_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.1% 1.2 KB 1.2 KB 701 B 702 B UMD_PROD
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 3.61 KB 3.61 KB 1.48 KB 1.48 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% 0.0% 10.98 KB 10.98 KB 4.08 KB 4.08 KB NODE_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.2% 1.04 KB 1.04 KB 632 B 633 B NODE_PROD
react-dom.production.min.js 0.0% 0.0% 111.43 KB 111.43 KB 35.91 KB 35.91 KB UMD_PROD
react-dom-server.node.development.js +0.6% +0.4% 137.19 KB 137.95 KB 36.07 KB 36.2 KB NODE_DEV
react-dom.production.min.js 0.0% 0.0% 111.4 KB 111.4 KB 35.34 KB 35.34 KB NODE_PROD
react-dom-server.node.production.min.js 🔺+0.3% 🔺+0.1% 20.01 KB 20.07 KB 7.48 KB 7.49 KB NODE_PROD
react-dom-server.browser.development.js +0.6% +0.4% 136.17 KB 136.93 KB 35.85 KB 35.98 KB NODE_DEV
react-dom-server.browser.production.min.js 🔺+0.3% 🔺+0.1% 19.6 KB 19.66 KB 7.32 KB 7.33 KB NODE_PROD
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 60.71 KB 60.71 KB 15.85 KB 15.85 KB UMD_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% 0.0% 10.75 KB 10.75 KB 3.68 KB 3.68 KB UMD_PROD
ReactDOMServer-dev.js +0.6% +0.4% 140.44 KB 141.34 KB 35.45 KB 35.6 KB FB_WWW_DEV
ReactDOMServer-prod.js 🔺+0.2% 🔺+0.2% 48.02 KB 48.13 KB 11.02 KB 11.05 KB FB_WWW_PROD
react-dom-unstable-fizz.node.development.js 0.0% +0.1% 3.87 KB 3.87 KB 1.51 KB 1.51 KB NODE_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% 0.0% 10.49 KB 10.49 KB 3.58 KB 3.58 KB NODE_PROD
react-dom-unstable-fizz.node.production.min.js 0.0% 🔺+0.3% 1.1 KB 1.1 KB 666 B 668 B NODE_PROD

Generated by 🚫 dangerJS

@gaearon gaearon merged commit 56f93a7 into facebook:master Aug 19, 2019
@gaearon gaearon deleted the err-susp-ssr branch August 19, 2019 18:53
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.

4 participants