-
-
Save laevandus/1ba2cad1a7b82f88bba0733a748b882c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Published var recipientFirstName: String = "" | |
// Model -> View Model | |
package.recipient.publisher(for: \.firstName) | |
.assign(to: &$recipientFirstName) | |
// View Model -> Model | |
$recipientFirstName.dropFirst() | |
.removeDuplicates() | |
.assign(to: \.firstName, on: package.recipient) | |
.store(in: &cancellables) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment