Repository navigation
Migrate BaseImage web component to expo-image
#83325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Julesssss
merged 6 commits into
Expensify:main
from
callstack-internal:VickyStash/refactor/33725-migrate-baseimage-web-to-expo
Mar 2, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a059b0b
Update web BaseImage to use expo-image
VickyStash a2317a4
Remove the unnecessary patch
VickyStash 175d8bc
Fix loading
VickyStash 5616761
Fix receipt preview display
VickyStash 820433d
Improve the check
VickyStash 42b9d16
Merge branch 'main' into VickyStash/refactor/33725-migrate-baseimage-…
VickyStash File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
201 changes: 0 additions & 201 deletions
201
patches/react-native-web/react-native-web+0.21.2+003+image-header-support.patch
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling
onLoadStartfrom auseEffectthat depends on bothsourceandonLoadStartcauses it to fire on every rerender when callers pass non-memoized handlers (for exampleImageViewpassesonLoadStart={imageLoadingStart}insrc/components/ImageView/index.tsx, whereimageLoadingStartis recreated each render). On web this can repeatedly enqueue state updates (setImageSize({width: 0, height: 0})) and lead to render thrashing or an update loop even when the image URL has not changed, which is a behavior regression from the prior event-drivenreact-nativeimage implementation.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that previously the same kind of logic was used in the Image from
react-native-web, it also calledonLoadStartfrom auseEffectthat depends on bothsourceandonLoadStart:https://github.com/necolas/react-native-web/blob/a9de220ba9e65bdea540fb5322ffb1da2b0bf442/packages/react-native-web/src/exports/Image/index.js#L278-L322
Just maybe I need to add a check for the source to be not a falsy value.