File tree Expand file tree Collapse file tree
Sources/ComposableArchitecture Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,6 +131,16 @@ import SwiftUI
131131/// to run only on the main thread, and so a check is executed immediately to make sure that is the
132132/// case. Further, all actions sent to the store and all scopes (see ``scope(state:action:)-90255``)
133133/// of the store are also checked to make sure that work is performed on the main thread.
134+ ///
135+ /// ### ObservableObject conformance
136+ ///
137+ /// The store conforms to `ObservableObject` but is _not_ observable via the `@ObservedObject`
138+ /// property wrapper. This conformance is completely inert and its sole purpose is to allow stores
139+ /// to be held in SwiftUI's `@StateObject` property wrapper.
140+ ///
141+ /// Instead, stores should be observed through Swift's Observation framework (or the Perception
142+ /// package when targeting iOS <17) by applying the ``ObservableState()`` macro to your feature's
143+ /// state.
134144@dynamicMemberLookup
135145#if swift(<5.10)
136146 @MainActor ( unsafe)
@@ -416,6 +426,8 @@ extension Store: CustomDebugStringConvertible {
416426 }
417427}
418428
429+ extension Store : ObservableObject { }
430+
419431/// A convenience type alias for referring to a store of a given reducer's domain.
420432///
421433/// Instead of specifying two generics:
You can’t perform that action at this time.
0 commit comments