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
Merged

Conversation

@sebmarkbage
Copy link
Member

@sebmarkbage sebmarkbage commented Oct 19, 2018

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
Member Author

@sebmarkbage sebmarkbage Oct 19, 2018

Bonus fix. Better feature test.

@sizebot
Copy link

@sizebot 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
Member

@acdlite acdlite left a comment

Check the CI failures

@sebmarkbage sebmarkbage merged commit 6938dca into facebook:master Oct 19, 2018
1 check passed
linjiajian999 pushed a commit to linjiajian999/react that referenced this issue 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants