Provide full flow support and addListener without calling DeviceEventEmitter
Support for:
var QuickActions = require('react-native-quick-actions');
QuickActions.addListener(function(data) {
// Do some cool stuff
});
It would be cool if registered listener callbacks are also processed when the app is launched via the new popInitialGesture method.
It would be cool if registered listener callbacks are also processed when the app is launched via the new popInitialGesture method.
I am not sure if handlers should be called as far as compliance with PushNotifications is considered.
As per Flow support, I can give it a go as well while implementing #7 if you don't mind ;)
PS. Thanks for converting my todos from my PR to issues!
I am not sure if handlers should be called as far as compliance with PushNotifications is considered.
You're probably right that we shouldn't deviate too much from existing conventions. I just know from my personal usage of this component I thought it felt a bit clunky having to register the handler twice. Once for normal events and another for initial actions.
As per Flow support, I can give it a go as well while implementing #7 if you don't mind ;)
Go for it! I appreciate the help :smile:
Yeah, but on the other hand, that's how LinkingIOS and PushNotificationsIOS all work, so I have them all in one place, which is really nice. Up to you, but I would've stayed with that approach. Otherwise, if one have handler for initial action and for event emitter - handler may get invoked twice resulting in e.g. same view presented twice etc.