Last active
November 15, 2021 16:43
-
-
Save karigrooms/c634cb9f5b4128492e8b9b71dca7a256 to your computer and use it in GitHub Desktop.
Blog: ObservableObjects and Protocols - Protocol without extending ObservableObject
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
// Copyright 2021 Expedia, Inc. | |
// SPDX-License-Identifier: Apache-2.0 | |
// Before | |
protocol PriceRequesting: ObservableObject { | |
// ... | |
} | |
class PricingProvider: PriceRequesting { | |
// ... | |
} | |
// After | |
protocol PriceRequesting { | |
// ... | |
} | |
class PricingProvider: PriceRequesting, ObservableObject { | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment