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

expose isHydrating #16909

Merged
merged 4 commits into from
Sep 26, 2019
Merged

expose isHydrating #16909

merged 4 commits into from
Sep 26, 2019

Conversation

lunaruan
Copy link
Contributor

@lunaruan lunaruan commented Sep 26, 2019

Added a function on ReactFiberHydrationContext to expose isHydrating in ReactDOMFB

@lunaruan lunaruan changed the title expose isHydrating for FB expose isHydrating for Fission Sep 26, 2019
@lunaruan lunaruan changed the title expose isHydrating for Fission expose isHydrating for Frisson Sep 26, 2019
@sizebot
Copy link

sizebot commented Sep 26, 2019

ReactDOM: size: 0.0%, gzip: 0.0%

Details of bundled changes.

Comparing: 911104a...95d4234

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% 120.77 KB 120.77 KB 38.01 KB 38.01 KB NODE_PROFILING
react-dom-server.browser.development.js 0.0% 0.0% 142.17 KB 142.17 KB 37.13 KB 37.13 KB UMD_DEV
ReactDOM-dev.js 0.0% +0.1% 978.23 KB 978.26 KB 215.84 KB 216 KB FB_WWW_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 19.86 KB 19.86 KB 7.37 KB 7.37 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.0% 11.19 KB 11.19 KB 4.16 KB 4.16 KB UMD_PROD
react-dom-test-utils.production.min.js 0.0% 🔺+0.1% 10.96 KB 10.96 KB 4.09 KB 4.09 KB NODE_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.2% 1.04 KB 1.04 KB 633 B 634 B NODE_PROD
react-dom.development.js 0.0% 0.0% 952.72 KB 952.72 KB 214.87 KB 214.88 KB UMD_DEV
react-dom.production.min.js 0.0% 0.0% 117.08 KB 117.08 KB 37.68 KB 37.69 KB UMD_PROD
react-dom.profiling.min.js 0.0% 0.0% 120.6 KB 120.6 KB 38.7 KB 38.7 KB UMD_PROFILING
react-dom.development.js 0.0% 0.0% 946.77 KB 946.77 KB 213.33 KB 213.33 KB NODE_DEV
react-dom-server.node.development.js 0.0% 0.0% 139.12 KB 139.12 KB 36.36 KB 36.36 KB NODE_DEV
react-dom.production.min.js 0.0% 0.0% 117.1 KB 117.1 KB 36.96 KB 36.96 KB NODE_PROD
react-dom-server.node.production.min.js 0.0% 0.0% 20.2 KB 20.2 KB 7.52 KB 7.52 KB NODE_PROD
ReactDOM-prod.js 🔺+0.3% 🔺+0.6% 393.61 KB 394.93 KB 71.6 KB 72.03 KB FB_WWW_PROD
ReactDOM-profiling.js -0.0% +0.6% 399.72 KB 399.71 KB 72.68 KB 73.09 KB FB_WWW_PROFILING
react-dom-server.browser.development.js 0.0% 0.0% 138.1 KB 138.1 KB 36.13 KB 36.13 KB NODE_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 19.79 KB 19.79 KB 7.36 KB 7.36 KB NODE_PROD
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 60.73 KB 60.73 KB 15.85 KB 15.85 KB UMD_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% 0.0% 10.74 KB 10.74 KB 3.67 KB 3.67 KB UMD_PROD
ReactDOMServer-prod.js 0.0% 0.0% 48.55 KB 48.55 KB 11.13 KB 11.13 KB FB_WWW_PROD
react-dom-unstable-native-dependencies.production.min.js 0.0% 0.0% 10.49 KB 10.49 KB 3.57 KB 3.57 KB NODE_PROD

Generated by 🚫 dangerJS against 95d4234

Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

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

Sure. Any reason we don't want to expose it on the reconciler interface, similar to findHostInstance?

@lunaruan lunaruan changed the title expose isHydrating for Frisson expose isHydrating Sep 26, 2019
@lunaruan
Copy link
Contributor Author

lunaruan commented Sep 26, 2019

This change is most likely just going to be temporary and only used in one place, so it seemed easier to put it on the SECRET_INTERNALS object for now so it can also be easily removed. Also, it makes it (hopefully) less likely people will use it. Longer term, I think we (@sebmck) want to expose a hook rather than this field for users.

Also, if we put this field only on ReactDomFB, only FB will be able to access it, whereas if we put it anywhere else we potentially are exposing it in other places

@lunaruan lunaruan merged commit c8dc7a9 into facebook:master Sep 26, 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.

None yet

6 participants