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

SSR support for class contextType #13889

Merged
merged 1 commit into from
Oct 19, 2018

Conversation

sebmarkbage
Copy link
Collaborator

Based on work by @alexmckenley

@@ -516,7 +518,7 @@ function constructClassInstance(
if (typeof contextType === 'object' && contextType !== null) {
if (__DEV__) {
if (
contextType.Consumer === undefined &&
contextType.$$typeof !== REACT_CONTEXT_TYPE &&
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Bonus fix. Better feature test.

@sizebot
Copy link

sizebot commented Oct 19, 2018

Details of bundled changes.

Comparing: fa65c58...82c6f56

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.development.js 0.0% 0.0% 677.48 KB 677.49 KB 157.36 KB 157.37 KB UMD_DEV
react-dom.development.js 0.0% 0.0% 672.82 KB 672.83 KB 155.96 KB 155.96 KB NODE_DEV
react-dom-server.browser.development.js +0.6% +0.5% 106.96 KB 107.64 KB 28.41 KB 28.54 KB UMD_DEV
react-dom-server.browser.production.min.js 🔺+0.5% 🔺+0.3% 15.71 KB 15.79 KB 6.01 KB 6.03 KB UMD_PROD
react-dom-server.browser.development.js +0.7% +0.5% 103.09 KB 103.77 KB 27.41 KB 27.54 KB NODE_DEV
react-dom-server.browser.production.min.js 🔺+0.5% 🔺+0.3% 15.61 KB 15.68 KB 6 KB 6.02 KB NODE_PROD
react-dom-server.node.development.js +0.7% +0.5% 105.01 KB 105.7 KB 27.97 KB 28.1 KB NODE_DEV
react-dom-server.node.production.min.js 🔺+0.4% 🔺+0.3% 16.42 KB 16.49 KB 6.3 KB 6.32 KB NODE_PROD
ReactDOM-dev.js 0.0% 0.0% 690.83 KB 690.84 KB 156.65 KB 156.67 KB FB_WWW_DEV
ReactDOMServer-dev.js +0.7% +0.5% 102.54 KB 103.3 KB 26.69 KB 26.83 KB FB_WWW_DEV
ReactDOMServer-prod.js 🔺+0.3% 🔺+0.1% 34.44 KB 34.56 KB 8.33 KB 8.34 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
Collaborator

@acdlite acdlite left a comment

Choose a reason for hiding this comment

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

Check the CI failures

@sebmarkbage sebmarkbage merged commit 6938dca into facebook:master Oct 19, 2018
linjiajian999 pushed a commit to linjiajian999/react that referenced this pull request Oct 22, 2018
@gaearon gaearon mentioned this pull request Oct 23, 2018
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