chirag04 / react-native-in-app-utils

A react-native wrapper for handling in-app payments
MIT License
890 stars 185 forks source link

Transaction observer should be called after JS code initialises #143

Open superandrew213 opened 6 years ago

superandrew213 commented 6 years ago

Transaction observer should be called after JS code initialises otherwise no callback will be registered and we would get No callback registered for transaction with state purchased. warning.

We should have a discussion about this since we might have to change the api and it will be a breaking change.

@chirag04 mentioned moving to an events based api. Callbacks are still fine in my opinion. However I am happy with either. We should discuss the pros & cons for each approach.

There is this https://github.com/chirag04/react-native-in-app-utils/pull/108 that also addresses this issue.