[RN][Refactor]: Rename React Native dismissal callbacks to onDismiss - #749
Draft
kieran-osgood-shopify wants to merge 1 commit into
Draft
kieran-osgood-shopify wants to merge 1 commit into
kieran-osgood-shopify wants to merge 1 commit into
Conversation
kieran-osgood-shopify
force-pushed
the
rn-ondismiss
branch
from
September 11, 2026 09:24
ee08470 to
451880d
Compare
kieran-osgood-shopify
changed the base branch from
main
to
swift-accelerated-checkout-dismissals
September 11, 2026 09:24
kieran-osgood-shopify
added this pull request to stack #763
September 11, 2026 09:24
kieran-osgood-shopify
force-pushed
the
rn-ondismiss
branch
from
September 11, 2026 14:50
451880d to
1992933
Compare
Assisted-By: devx/3f0e7f93-212d-45d8-b056-138b2da8389f
kieran-osgood-shopify
force-pushed
the
rn-ondismiss
branch
from
September 11, 2026 14:51
1992933 to
5c69ccb
Compare
| * Presents the checkout sheet for a given checkout URL. | ||
| * | ||
| * Exactly one of `callbacks.onClose` or `callbacks.onFail` fires per | ||
| * At most one of `callbacks.onDismiss` or `callbacks.onFail` fires per |
Contributor
Author
There was a problem hiding this comment.
🟡 Before this PR is merged, update checkoutKit.nativeSdkVersions.ios and .android in package.json to 4.0.0-alpha.7 after those native artifacts are published. This lifecycle contract depends on the alpha.7 native dismissal behavior.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changes are you making?
Closes https://github.com/shop/issues-checkout-kit/issues/1261
Rename the React Native checkout dismissal callbacks to use one public API name:
PresentCallbacks.onClose→onDismissAcceleratedCheckoutButtons.onCancel→onDismissThis is an intentional breaking rename without compatibility aliases. The private native lifecycle event remains
close.Document and test that checkout completion and presentation dismissal are separate events:
CheckoutProtocol.completereports order completion, whileonDismissreports a later buyer dismissal. Programmaticdismiss()invokes neitheronDismissnoronFail.Register accelerated checkout's
onDismissas a direct native event. React Native already reservestopDismissas a direct event for modal dismissal; registering it as bubbling caused an event-type collision and an iOS RedBox during app startup.Update the sample, API report, README, JavaScript tests, and iOS integration coverage.
How to test
GIVEN the React Native sample is configured with a storefront and has an item in the cart
WHEN the reviewer taps Checkout and closes the checkout presentation before completing payment
THEN the sample should log
onDismissonce and return to the cart without invokingonFailGIVEN the React Native sample is configured with a storefront, has an item in the cart, and can complete a test payment
WHEN the reviewer completes checkout and then dismisses the confirmation presentation
THEN
CheckoutProtocol.completeshould be logged when the order completes, followed byonDismissonly when the buyer dismisses the presentationGIVEN the iOS React Native sample is built with the New Architecture and launched on iOS 16 or newer
WHEN the reviewer opens the catalog and navigates to the cart
THEN the app should render without a RedBox reporting that
RCTAcceleratedCheckoutButtonsre-registeredtopDismissas a bubbling eventGIVEN the Android React Native sample is built with the New Architecture
WHEN the reviewer launches the app and opens the catalog
THEN the app should render without a LogBox warning about
topDismissbeing registered as both a direct and bubbling eventBefore you merge
Important
platforms/react-native/README.md)Releasing a new Swift version?
ShopifyCheckoutKit.podspecplatforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swiftplatforms/swift/README.md(major version only)Releasing a new Embedded Checkout Protocol version?
embeddedCheckoutProtocolAndroidinplatforms/android/gradle/libs.versions.tomlprotocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.apiif the public API changedReleasing a new Android version?
checkoutKitAndroidinplatforms/android/gradle/libs.versions.tomlplatforms/android/README.mdTip
See the Contributing documentation for the full release process per platform.