Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save karigrooms/c634cb9f5b4128492e8b9b71dca7a256 to your computer and use it in GitHub Desktop.
Save karigrooms/c634cb9f5b4128492e8b9b71dca7a256 to your computer and use it in GitHub Desktop.
Blog: ObservableObjects and Protocols - Protocol without extending ObservableObject
// 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