Skip to content

Error gracefully for unsupported SSR features#13839

Merged
gaearon merged 1 commit intofacebook:masterfrom
gaearon:ssr-stuffs
Oct 12, 2018
Merged

Error gracefully for unsupported SSR features#13839
gaearon merged 1 commit intofacebook:masterfrom
gaearon:ssr-stuffs

Conversation

@gaearon
Copy link
Copy Markdown
Collaborator

@gaearon gaearon commented Oct 12, 2018

While we may plan to make Suspense work for some cases for the current SSR (I think?), in the meantime I'm adding coverage for the current behavior and replacing highly unintuitive Invalid element type errors that happen today.

I also added a test for client-only post-hydration use of Suspense, to avoid accidentally regressing this.

@sizebot
Copy link
Copy Markdown

sizebot commented Oct 12, 2018

Details of bundled changes.

Comparing: 6d5d250...821a421

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom-server.browser.development.js +0.2% +0.2% 106.3 KB 106.56 KB 28.25 KB 28.3 KB UMD_DEV
react-dom-server.browser.production.min.js 🔺+0.4% 🔺+0.4% 15.47 KB 15.53 KB 5.92 KB 5.95 KB UMD_PROD
react-dom-server.browser.development.js +0.3% +0.2% 102.43 KB 102.69 KB 27.25 KB 27.3 KB NODE_DEV
react-dom-server.browser.production.min.js 🔺+0.4% 🔺+0.3% 15.38 KB 15.44 KB 5.86 KB 5.88 KB NODE_PROD
react-dom-server.node.development.js +0.3% +0.2% 104.35 KB 104.61 KB 27.81 KB 27.86 KB NODE_DEV
react-dom-server.node.production.min.js 🔺+0.4% 🔺+0.3% 16.18 KB 16.24 KB 6.16 KB 6.18 KB NODE_PROD
ReactDOMServer-dev.js +0.3% +0.2% 101.85 KB 102.16 KB 26.53 KB 26.59 KB FB_WWW_DEV
ReactDOMServer-prod.js 🔺+0.4% 🔺+0.3% 33.87 KB 34 KB 8.15 KB 8.17 KB FB_WWW_PROD

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

Copy link
Copy Markdown
Contributor

@trueadm trueadm left a comment

Choose a reason for hiding this comment

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

LGTM

@gaearon gaearon merged commit 8ca8a59 into facebook:master Oct 12, 2018
@gaearon gaearon deleted the ssr-stuffs branch October 12, 2018 13:47
linjiajian999 pushed a commit to linjiajian999/react that referenced this pull request Oct 22, 2018
jetoneza pushed a commit to jetoneza/react that referenced this pull request Jan 23, 2019
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