Skip to content

fix(ios): extract Image.ios.js props once - #57710

Open
mdjastrzebski wants to merge 2 commits into
react:mainfrom
mdjastrzebski:refactor/extract-image-ios-props-once
Open

fix(ios): extract Image.ios.js props once#57710
mdjastrzebski wants to merge 2 commits into
react:mainfrom
mdjastrzebski:refactor/extract-image-ios-props-once

Conversation

@mdjastrzebski

@mdjastrzebski mdjastrzebski commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary:

Two changes to Image.ios.js (follow up to #57633):

1. Extract props once. Per @javache 's review comment, props are now destructured once in the parameter list and written into a single resolvedProps object that is spread into ImageViewNativeComponent once, modelled on View
and matching Image.android.js. The ImageAnalyticsTagContext.Consumer render callback is also replaced
with use(ImageAnalyticsTagContext).

2. Align aria-* vs accessibilityState with other components. aria-* state props now take
priority per key with fallback to accessibilityState, matching View, Text, TextInput,
Pressable and Image.android.js. Image.ios.js was the only outlier with buggy behavior where the raw object accessibilityState object replaced the merged one.

Changelog:

[IOS] [FIXED] - Image: aria-* state props are no longer ignored when accessibilityState is also present

Test Plan:

Unchanged tests pass

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 28, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jul 28, 2026
@meta-codesync

meta-codesync Bot commented Jul 29, 2026

Copy link
Copy Markdown

@javache has imported this pull request. If you are a Meta employee, you can view this in D114048967.

^ Conflicts:
^	packages/react-native/Libraries/Image/Image.ios.js
@mdjastrzebski
mdjastrzebski force-pushed the refactor/extract-image-ios-props-once branch from 5aeb8c0 to ae90b30 Compare July 29, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants