Skip to content

Commit 9c664db

Browse files
authored
docs(firebase-messaging): fix error in content (#224)
* docs(firebase-messaging): update * chore: update * chore: update * fix: error in content
1 parent 14c26bb commit 9c664db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/firebase-messaging/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ firebase().messaging().showNotificationsWhenInForeground = true;
175175
```
176176
#### Listen to notification messages in the foreground
177177

178-
Since notification messages are displayed automatically(see [Notifications messages delivery and app state](#notifications-messages-delivery-and-app-state)) when the app is in the foreground, sometimes you may want to handle the display of the message manually. To listen to a message in the foreground and handle their display manually, call the [onMessage](#onmessage) method on the instance of [Messaging class](#messaging-class). Code executed via this handler can interact with your application (e.g. updating the state or UI).
178+
Since notification messages are displayed automatically(see [Notifications messages delivery and app state](#notifications-messages-delivery-and-app-state)) when the app is in the background, sometimes you may want to handle the display of the message manually. To listen to a message being received when the app is in the foreground or manually handle the display of the message when the app is in the background, pass a callback function to the [onMessage](#onmessage) method of the instance of [Messaging class](#messaging-class). The callback will. Code executed via this handler can interact with your application (e.g. updating the state or UI).
179179

180180
For example, you could display a new Alert each time a message is delivered:
181181

0 commit comments

Comments
 (0)