Skip to content

fix(iOS): avoid invalidating unchanged nil node props - #3172

Draft
NginxL wants to merge 1 commit into
software-mansion:mainfrom
NginxL:fix/ios-nil-node-props
Draft

NginxL wants to merge 1 commit into
software-mansion:mainfrom
NginxL:fix/ios-nil-node-props

Conversation

@NginxL

@NginxL NginxL commented Dec 6, 2026

Copy link
Copy Markdown

Summary

Fixes #3130.

name, display, and mask now compare object identity before calling isEqualToString:. This makes nil -> nil an unchanged value and avoids invalidating the node on every Fabric prop update. Equal non-nil strings continue to use the existing content comparison.

Test Plan

  • Compiled and ran a small macOS Foundation check confirming that [nil isEqualToString:nil] is false while the new identity-or-equality guard returns true; also checked a non-nil equal-string case.
  • git diff --check passed.
  • Not run: full Xcode/React Native build, iOS simulator reproduction, Reanimated profiling, Jest, TypeScript, or lint. The sparse environment does not have the project dependencies or a configured example app. No device performance improvement is claimed here.

AI disclosure

An AI coding agent drafted this focused change and verification summary. The nil semantics were checked with Foundation; runtime rendering and performance remain unverified.

Compare object identity before isEqualToString so nil name, display, and mask values no longer invalidate every prop update. Non-nil equal strings still use the existing content comparison.

Assisted-by: Little Code Sauce <8777777+NginxL@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iOS Fabric] Every updateProps invalidates the node: nil name/display/mask never compare equal

1 participant