-
Notifications
You must be signed in to change notification settings - Fork 24.6k
React Native 0.79 iOS regression for RCTWindowFrameDidChangeNotification #50621
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
Comments
@jpudysz just to understand, are you saying that the issue regressed again, as it was fixed in 0.77/0.78 but regressed once more? |
It worked from version 0.76.2 but broke again in 0.79.0 |
@cipolleschi do you have context on this one? |
Great find @migueldaipre. That's because: Got applied on top. Perhaps @okwasniewski or @cipolleschi can shed some light here? |
The context is that, in the effort of decoupling react native from the App Delegate and toward supporting the SceneDelegate, we were refactoring the observers for those events. I don't think the delegate is the right fix, as we were changing the mechanism that emit the event. We might have missed a spot. @okwasniewski can you look into it? |
@cipolleschi @jpudysz Yeah, previous fixes for this are incorrect with the new approach. So actually now the @cipolleschi For backward compatibility's sake, should we still emit this notification if there are any changes to the trait collection not only to the frame? |
For me, this is a breaking change without any notice. Also, it’s easier for me to listen for a single event, debounce it, and re-compute something rather than listening for multiple events and adding extra overhead on top of that. Keep in mind that this event reported updates for all sort of changes: orientation/screen size/color scheme/content size category |
Any updates? 👀 |
Hi @jpudysz and @yerffejytnac, the The fact that we were firing it for any kind of change before was a bug. If the library was depending on a bug, that's not a good reason for not fixing the bug. Imagine if react was rendering all the components twice and people started creating libraries depending on that behavior. We should be able to fix the behavior, even if it breaks the libraries. I'm sorry that we didn't communicate the change properly, we didn't realize that some libraries might be depending on that behavior. I do understand that having the event emitted for every change was convenient, but we can't have that code in React Native: we would have all the apps paying the cost of sending notifications, even those apps that are not using the library. If it is important for your library to observe all those events and to unify them in a single notification, it should be fairly easy to implement that mechanism in the library and to listen to the various notifications emitted by the OS and react accordingly. |
No worries, and thanks for the update. I will patch it on the library level 🙏 |
Description
Hello,
I've noticed a regression in the RCTWindowFrameDidChangeNotification event on iOS when using React Native 0.79. The event no longer fires, as reported in #47234
This issue only occurs with the newest release. I also found this PR #49162 which may be related.
Steps to reproduce
React Native Version
0.79.0
Affected Platforms
Runtime - iOS
Output of
npx @react-native-community/cli info
Stacktrace or Logs
Reproducer
https://github.com/jpudysz/RN079-repro
Screenshots and Videos
RN 0.78.2:
Screen.Recording.2025-04-10.at.12.43.05.mov
RN 0.79.0:
Screen.Recording.2025-04-10.at.12.40.46.mov
The text was updated successfully, but these errors were encountered: