} } protocol ObjectB: ObservableObject { var string: String { get } } struct MyView<A: ObjectA, B: ObjectB>: View { @EnvironmentObject var a: A @EnvironmentObject var b: B var body: some View { Text("\(a.int), \(b.string)") } } protocol ComponentA {} final class MyObjectA<A: ComponentA>: ObjectA { @ObservedObject var a: A @Published var int = 0 } protocol ComponentB {} final class MyObjectB<B: ComponentB>: ObjectB { @ObservedObject var b: B @Published var string = "" } struct Component: ComponentA, ComponentB {} return MyView<MyObjectA<Component>, MyObjectB<Component>>() &OWJSPONFOU0CKFDUͷґଘʹ δΣωϦΫε͕ΘΕΔͱ δΣωϦοΫܕͷωετͰ͞ΒʹΧΦε