-
-
Notifications
You must be signed in to change notification settings - Fork 597
feat(iOS, Tabs): Migrate to new invalidate method #3367
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
base: main
Are you sure you want to change the base?
Conversation
33dd2e4 to
f060ee3
Compare
kligarski
left a comment
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.
Looks good. I'm not a big fan of dispatching invalidation after 1 tick but if it's necessary then it is what it is I guess.
Co-authored-by: Krzysztof Ligarski <[email protected]>
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 we complicate things too much here.
If the old solution is reliable (it is, right?) and the new one is only a refactor using new APIs & cleaning up the code, we defeat the purpose by introducing both & increasing complexity of the code even more. I am against landing this change before RN 0.82 becomes our minimal supported react native version. What do you think?
The old solution works reliably and I agree that this PR adds additional complexity. We can wait until we support 0.82 as a minimal version, because these changes I'm introducing here are needed for backward compatibility atm |
|
@t0maboro Let's move both to on-hold state. I think that we defeat the purpose currently by introducing two separate mechanism depending on version. Let's wait few weeks. |
ack |
|
Switching to draft until we drop support for RN versions prior to 0.82 |
When this is the case, we should also handle |
Description
This PR updates the logic responsible for triggering the
invalidatecallback. We're now aligning the logic to useRCTComponentViewProtocolcallback, when available.Depending on the React Native architecture and version, the invalidate mechanism behaves differently:
RCTInvalidatingprotocol.RNSViewControllerInvalidating.RCTComponentViewProtocol. This PR enables usage of that callback.Changes
RNSReactNativeVersionUtils- for runtime checks as the commit with the new method in protocol was CP to 0.82 releaseTest code and steps to reproduce
Verified that breakpoints in
invalidateImplare hit when expected from the expected paths for:Checklist