Skip to content

Commit 6acafc3

Browse files
committed
Remove current/child check for hydration and rely on the root flag instead
1 parent 19920ee commit 6acafc3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

packages/react-reconciler/src/ReactFiberBeginWork.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -937,11 +937,7 @@ function updateHostRoot(current, workInProgress, renderExpirationTime) {
937937
);
938938
}
939939
const root: FiberRoot = workInProgress.stateNode;
940-
if (
941-
(current === null || current.child === null) &&
942-
root.hydrate &&
943-
enterHydrationState(workInProgress)
944-
) {
940+
if (root.hydrate && enterHydrationState(workInProgress)) {
945941
// If we don't have any current children this might be the first pass.
946942
// We always try to hydrate. If this isn't a hydration pass there won't
947943
// be any children to hydrate which is effectively the same thing as

0 commit comments

Comments
 (0)