From 403d54391e9dc6da499345709d9d4283073fa3ec Mon Sep 17 00:00:00 2001 From: Bartlomiej Bloniarz Date: Thu, 2 Jul 2026 03:45:56 -0700 Subject: [PATCH] Run AnimationBackend commit hook on ReactRevisionMerge commits Summary: `AnimationBackendCommitHook` reconciles animated props during React commits to prevent React from overwriting animation-driven prop updates. Commits with source `ReactRevisionMerge` were being excluded, which currently was not a problem, because this source is only used with fabricCommitBranching which is currently disabled. Changelog: [General][Fixed] - Add `ReactRevisionMerge` source to the AnimationBackendCommitHook Differential Revision: D110459778 --- .../renderer/animationbackend/AnimationBackendCommitHook.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactCommon/react/renderer/animationbackend/AnimationBackendCommitHook.cpp b/packages/react-native/ReactCommon/react/renderer/animationbackend/AnimationBackendCommitHook.cpp index cb547d9e367d..1d62ea3be3ce 100644 --- a/packages/react-native/ReactCommon/react/renderer/animationbackend/AnimationBackendCommitHook.cpp +++ b/packages/react-native/ReactCommon/react/renderer/animationbackend/AnimationBackendCommitHook.cpp @@ -24,7 +24,8 @@ RootShadowNode::Unshared AnimationBackendCommitHook::shadowTreeWillCommit( const RootShadowNode::Unshared& newRootShadowNode, const ShadowTreeCommitOptions& commitOptions) noexcept { if (commitOptions.source != ShadowTreeCommitSource::React && - commitOptions.source != ShadowTreeCommitSource::AnimationEndSync) { + commitOptions.source != ShadowTreeCommitSource::AnimationEndSync && + commitOptions.source != ShadowTreeCommitSource::ReactRevisionMerge) { return newRootShadowNode; }