-
-
Notifications
You must be signed in to change notification settings - Fork 597
feat(iOS, Stack): Migrate to new invalidate method #3368
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: @t0maboro/tabs-invalidation
Are you sure you want to change the base?
feat(iOS, Stack): Migrate to new invalidate method #3368
Conversation
c9c2b29 to
9b286c3
Compare
| if (!self->_toBeDeletedScreens.empty()) { | ||
| __weak RNSScreenStackView *weakSelf = self; | ||
| // We want to run after container updates are performed (transitions etc.) | ||
| dispatch_async(dispatch_get_main_queue(), ^{ |
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.
note: it seems that we can consider removing that delay as invalidateImpl is doing the same right now, but I decided to leave it as it is, because we're invalidating a bit later and the code will be dropped when we stop supporting <0.82
Co-authored-by: Krzysztof Ligarski <[email protected]>
788b570 to
e1cd715
Compare
|
Switching to draft until we drop support for RN versions before 0.82 |
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:
invalidateflow continues to use theRCTInvalidatingprotocol.RCTComponentViewProtocol. This PR enables usage of that callback.Note: I'm using some common code from: #3367
Changes
RNSReactNativeVersionUtilsin stack - for runtime checks as the commit with the new method in protocol was CP to 0.82 releaseinvalidateImplTest code and steps to reproduce
Check any example with native stack and verify whether
invalidatecallback is called from a proper path, e.g. by hitting a breakpoint.Checklist