From 3bf6ea34b5552a9df9c13720dabb27d86b4f9cc9 Mon Sep 17 00:00:00 2001 From: Ryan Christian Date: Sun, 9 Mar 2025 05:01:22 -0500 Subject: [PATCH] revert: Bring back strict-equality bailout for children even w/ context updates Reverts a portion of #4048 --- src/diff/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/diff/index.js b/src/diff/index.js index 1ae0ab1251..2cba2714b6 100644 --- a/src/diff/index.js +++ b/src/diff/index.js @@ -165,14 +165,14 @@ export function diff( } if ( - !c._force && - ((c.shouldComponentUpdate != NULL && + (!c._force && + c.shouldComponentUpdate != NULL && c.shouldComponentUpdate( newProps, c._nextState, componentContext ) === false) || - newVNode._original == oldVNode._original) + newVNode._original == oldVNode._original ) { // More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8 if (newVNode._original != oldVNode._original) {