Skip to content
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

onLoadEnd and other Callbacks are not getting called on new architecture #191

Closed
gurmundi7 opened this issue Feb 13, 2025 · 2 comments
Closed

Comments

@gurmundi7
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior if possible, or a link to a reproduction repo:

  1. add any callback method for FastImage, exp: onLoadEnd
<FastImage {...props} onLoadEnd={()=>{
console.log("onLoadEnd");
}} />

Expected behavior
onLoadEnd should be called when image loading is done.

Dependency versions

  • React Native version: 0.77.0
  • React version: 18.3.1
  • React Native Fast Image version: 8.9.1

Additional Information I found
as I tried to track down the issue. I found that _eventEmitter is nullPtr FFFastImageView->onLoadEndEvent and this condition
if (_eventEmitter != nullptr) {...}
never gets passed.

to understand why its nullPtr, found that

- (void)updateEventEmitter:(const facebook::react::EventEmitter::Shared &)eventEmitter

method where we set eventEmitter never gets called

Copy link

👋 Welcome to the community!
Thank you for opening your first issue. We appreciate your contribution and will review it as soon as possible.
Feel free to ask questions, share ideas, or provide any additional details! We're here to help. 😄

@princektripathi
Copy link
Contributor

@gurmundi7, it is working fine. I validated this for both old and new arch on Android. Please share a reproducer if you are still facing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants