Skip to content

Commit 5f27d48

Browse files
committed
Adjust Messenger documentation
1 parent f57f1f9 commit 5f27d48

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Documentation/specific-patterns.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ let latestMessage = textMessenger.latestUpdate.new // or: textMessenger.source.v
5050

5151
### The Messenger Class
5252

53-
To implement the *Messenger Pattern*, you **can** also use class `Messenger`, which stores (duplicates) the last sent message but offers a few advantages:
53+
Instead of implementing the *Messenger* yourself, you **can** also use `Messenger`, which stores (duplicates) the last sent message but offers some advantages:
5454

55-
1. The intended use of the object is more explicit.
56-
2. All sent messages become `latestUpdate` (also guaranteeing that `send()` resends the last sent message).
55+
1. The intended use of the object is more explicit
56+
2. All sent messages become `latestUpdate` (also guaranteeing that `send()` resends the last sent message)
5757
3. The message type doesn't need to be `Codable`
58-
4. You don't need to map onto `new`
58+
4. You don't need to map onto `new`, neither when creating the *Messenger* nor when retrieving its last message
5959

6060
~~~swift
6161
let textMessenger = Messenger<String>()

0 commit comments

Comments
 (0)