GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — expose isHydrating (#16909) · react/react@c8dc7a9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages
    • react-dom/src/client
      • ReactDOMFB.js
    • react-reconciler/src
      • ReactFiberHydrationContext.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/react-dom/src/client/ReactDOMFB.js‎

Copy file name to clipboardExpand all lines: packages/react-dom/src/client/ReactDOMFB.js
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99

1010
import {findCurrentFiberUsingSlowPath} from 'react-reconciler/reflection';
11+
import {getIsHydrating} from 'react-reconciler/src/ReactFiberHydrationContext';
1112
import {get as getInstance} from 'shared/ReactInstanceMap';
1213
import {addUserTimingListener} from 'shared/ReactFeatureFlags';
1314

@@ -33,6 +34,8 @@ Object.assign(
3334
},
3435
// Perf experiment
3536
addUserTimingListener,
37+
38+
getIsHydrating,
3639
},
3740
);
3841

Collapse file

‎packages/react-reconciler/src/ReactFiberHydrationContext.js‎

Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberHydrationContext.js
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,10 @@ function resetHydrationState(): void {
484484
isHydrating = false;
485485
}
486486

487+
function getIsHydrating(): boolean {
488+
return isHydrating;
489+
}
490+
487491
export {
488492
warnIfHydrating,
489493
enterHydrationState,
@@ -494,4 +498,5 @@ export {
494498
prepareToHydrateHostTextInstance,
495499
prepareToHydrateHostSuspenseInstance,
496500
popHydrationState,
501+
getIsHydrating,
497502
};

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.