【发布时间】:2018-03-22 19:29:31
【问题描述】:
我刚刚安装了 react-native-firebase v4.0,我正在尝试检测何时有人打开了我从 google 控制台发送的通知。
但是当我将文档中的示例放入我的代码中时,我得到了
解析错误:意外令牌,预期:(致命)
在“行动”
我在这里缺少什么?我以前从未使用过这种语法。
componentDidMount() {
this.notificationOpenedListener = firebase.notifications().onNotificationOpened(notificationOpen: NotificationOpen => {
// Get the action triggered by the notification being opened
const action = notificationOpen.action;
// Get information about the notification that was opened
const notification: Notification = notificationOpen.notification;
});
}
【问题讨论】:
标签: javascript react-native react-native-firebase