Skip to content

Commit 4548ccd

Browse files
committed
[Fiber] Replay events between commits (#33130)
Stacked on #33129. Flagged behind `enableHydrationChangeEvent`. If you type into a controlled input before hydration and something else rerenders like a setState in an effect, then the controlled input will reset to whatever React thought it was. Even with event replaying that this is stacked on, if the second render happens before event replaying has fired in a separate task. We don't want to flush inside the commit phase because then things like flushSync in these events wouldn't work since they're inside the commit stack. This flushes all event replaying between renders by flushing it at the end of `flushSpawned` work. We've already committed at that point and is about to either do subsequent renders or yield to event loop for passive effects which could have these events fired anyway. This just ensures that they've already happened by the time subsequent renders fire. This means that there's now a type of event that fire between sync render passes. DiffTrain build for [54a5072](54a5072)
1 parent 8c3326d commit 4548ccd

34 files changed

+98
-90
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
587cb8f8967866139bbfdbae3f519cb37e68a054
1+
54a50729cc47a884c2110d7c59dd5f850748e142
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
587cb8f8967866139bbfdbae3f519cb37e68a054
1+
54a50729cc47a884c2110d7c59dd5f850748e142

compiled/facebook-www/React-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ __DEV__ &&
15381538
exports.useTransition = function () {
15391539
return resolveDispatcher().useTransition();
15401540
};
1541-
exports.version = "19.2.0-www-classic-587cb8f8-20250506";
1541+
exports.version = "19.2.0-www-classic-54a50729-20250506";
15421542
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15431543
"function" ===
15441544
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ __DEV__ &&
15381538
exports.useTransition = function () {
15391539
return resolveDispatcher().useTransition();
15401540
};
1541-
exports.version = "19.2.0-www-modern-587cb8f8-20250506";
1541+
exports.version = "19.2.0-www-modern-54a50729-20250506";
15421542
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15431543
"function" ===
15441544
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,4 +636,4 @@ exports.useSyncExternalStore = function (
636636
exports.useTransition = function () {
637637
return ReactSharedInternals.H.useTransition();
638638
};
639-
exports.version = "19.2.0-www-classic-587cb8f8-20250506";
639+
exports.version = "19.2.0-www-classic-54a50729-20250506";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,4 +636,4 @@ exports.useSyncExternalStore = function (
636636
exports.useTransition = function () {
637637
return ReactSharedInternals.H.useTransition();
638638
};
639-
exports.version = "19.2.0-www-modern-587cb8f8-20250506";
639+
exports.version = "19.2.0-www-modern-54a50729-20250506";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ exports.useSyncExternalStore = function (
640640
exports.useTransition = function () {
641641
return ReactSharedInternals.H.useTransition();
642642
};
643-
exports.version = "19.2.0-www-classic-587cb8f8-20250506";
643+
exports.version = "19.2.0-www-classic-54a50729-20250506";
644644
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
645645
"function" ===
646646
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ exports.useSyncExternalStore = function (
640640
exports.useTransition = function () {
641641
return ReactSharedInternals.H.useTransition();
642642
};
643-
exports.version = "19.2.0-www-modern-587cb8f8-20250506";
643+
exports.version = "19.2.0-www-modern-54a50729-20250506";
644644
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
645645
"function" ===
646646
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19037,10 +19037,10 @@ __DEV__ &&
1903719037
(function () {
1903819038
var internals = {
1903919039
bundleType: 1,
19040-
version: "19.2.0-www-classic-587cb8f8-20250506",
19040+
version: "19.2.0-www-classic-54a50729-20250506",
1904119041
rendererPackageName: "react-art",
1904219042
currentDispatcherRef: ReactSharedInternals,
19043-
reconcilerVersion: "19.2.0-www-classic-587cb8f8-20250506"
19043+
reconcilerVersion: "19.2.0-www-classic-54a50729-20250506"
1904419044
};
1904519045
internals.overrideHookState = overrideHookState;
1904619046
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -19074,7 +19074,7 @@ __DEV__ &&
1907419074
exports.Shape = Shape;
1907519075
exports.Surface = Surface;
1907619076
exports.Text = Text;
19077-
exports.version = "19.2.0-www-classic-587cb8f8-20250506";
19077+
exports.version = "19.2.0-www-classic-54a50729-20250506";
1907819078
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1907919079
"function" ===
1908019080
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18809,10 +18809,10 @@ __DEV__ &&
1880918809
(function () {
1881018810
var internals = {
1881118811
bundleType: 1,
18812-
version: "19.2.0-www-modern-587cb8f8-20250506",
18812+
version: "19.2.0-www-modern-54a50729-20250506",
1881318813
rendererPackageName: "react-art",
1881418814
currentDispatcherRef: ReactSharedInternals,
18815-
reconcilerVersion: "19.2.0-www-modern-587cb8f8-20250506"
18815+
reconcilerVersion: "19.2.0-www-modern-54a50729-20250506"
1881618816
};
1881718817
internals.overrideHookState = overrideHookState;
1881818818
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -18846,7 +18846,7 @@ __DEV__ &&
1884618846
exports.Shape = Shape;
1884718847
exports.Surface = Surface;
1884818848
exports.Text = Text;
18849-
exports.version = "19.2.0-www-modern-587cb8f8-20250506";
18849+
exports.version = "19.2.0-www-modern-54a50729-20250506";
1885018850
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1885118851
"function" ===
1885218852
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)