| #
bd469e42 |
| 11-Feb-2020 |
Stanisław Chmiela <[email protected]> |
[expo-notifications] Receiving notifications (#6773)
# Why
Another step of `expo-notifications` extraction.
# How
- A singleton `EXNotificationCenterDelegate | NotificationManager` is infor
[expo-notifications] Receiving notifications (#6773)
# Why
Another step of `expo-notifications` extraction.
# How
- A singleton `EXNotificationCenterDelegate | NotificationManager` is informed of new notifications. The information is redirected to `EXNotificationDelegates | NotificationListeners`, which in fact are
- `EXNotificationsEmitters | NotificationsEmitters` which serialize the notifications and emit events to JS.

> Multiple `EventEmitter`s on the image show the situation that will happen in Expo client or when React instance is restarting. In normal situation there is only one emitter per bridge.
> **Note:** what happens to the notification (if it's presented, dismissed, etc) will be decided in another module/PR (handling notifications). Since handling is a non-trivial task (requires communication back and forth) I think splitting those concerns may make the module easier to maintain.
# Test Plan
Received notifications can be printed to `console` when a listener is registered.
show more ...
|