You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/ComposableArchitecture/ViewStore.swift
+74-8Lines changed: 74 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -137,29 +137,60 @@ public final class ViewStore<ViewState, ViewAction>: ObservableObject {
137
137
138
138
/// Initializes a view store from a store.
139
139
///
140
+
/// > Warning: This initializer is deprecated. Use
141
+
/// ``ViewStore/init(_:observe:removeDuplicates:)`` to make state observation explicit.
142
+
/// >
143
+
/// > When using ``ViewStore`` you should take care to observe only the pieces of state that
144
+
/// your view needs to do its job, especially towards the root of the application. See
145
+
/// <doc:Performance> for more details.
146
+
///
140
147
/// - Parameters:
141
148
/// - store: A store.
142
149
/// - isDuplicate: A function to determine when two `State` values are equal. When values are
143
150
/// equal, repeat view computations are removed.
144
151
@available(
145
152
iOS,
146
153
deprecated:9999.0,
147
-
message:"Use 'init(_:observe:removeDuplicates:)' to make state observation explicit."
154
+
message:"""
155
+
Use 'init(_:observe:removeDuplicates:)' to make state observation explicit.
156
+
157
+
When using ViewStore you should take care to observe only the pieces of state that your view needs to do its job, especially towards the root of the application. See the performance article for more details:
message:"Use 'init(_:observe:removeDuplicates:)' to make state observation explicit."
165
+
message:"""
166
+
Use 'init(_:observe:removeDuplicates:)' to make state observation explicit.
167
+
168
+
When using ViewStore you should take care to observe only the pieces of state that your view needs to do its job, especially towards the root of the application. See the performance article for more details:
message:"Use 'init(_:observe:removeDuplicates:)' to make state observation explicit."
176
+
message:"""
177
+
Use 'init(_:observe:removeDuplicates:)' to make state observation explicit.
178
+
179
+
When using ViewStore you should take care to observe only the pieces of state that your view needs to do its job, especially towards the root of the application. See the performance article for more details:
message:"Use 'init(_:observe:removeDuplicates:)' to make state observation explicit."
187
+
message:"""
188
+
Use 'init(_:observe:removeDuplicates:)' to make state observation explicit.
189
+
190
+
When using ViewStore you should take care to observe only the pieces of state that your view needs to do its job, especially towards the root of the application. See the performance article for more details:
/// > Warning: This initializer is deprecated. Use
601
+
/// ``ViewStore/init(_:observe:)`` to make state observation explicit.
602
+
/// >
603
+
/// > When using ``ViewStore`` you should take care to observe only the pieces of state that
604
+
/// your view needs to do its job, especially towards the root of the application. See
605
+
/// <doc:Performance> for more details.
606
+
///
607
+
/// - Parameters:
608
+
/// - store: A store.
567
609
@available(
568
610
iOS,
569
611
deprecated:9999.0,
570
-
message:"Use 'init(_:observe:)' to make state observation explicit."
612
+
message:"""
613
+
Use 'init(_:observe:)' to make state observation explicit.
614
+
615
+
When using ViewStore you should take care to observe only the pieces of state that your view needs to do its job, especially towards the root of the application. See the performance article for more details:
message:"Use 'init(_:observe:)' to make state observation explicit."
623
+
message:"""
624
+
Use 'init(_:observe:)' to make state observation explicit.
625
+
626
+
When using ViewStore you should take care to observe only the pieces of state that your view needs to do its job, especially towards the root of the application. See the performance article for more details:
message:"Use 'init(_:observe:)' to make state observation explicit."
634
+
message:"""
635
+
Use 'init(_:observe:)' to make state observation explicit.
636
+
637
+
When using ViewStore you should take care to observe only the pieces of state that your view needs to do its job, especially towards the root of the application. See the performance article for more details:
message:"Use 'init(_:observe:)' to make state observation explicit."
645
+
message:"""
646
+
Use 'init(_:observe:)' to make state observation explicit.
647
+
648
+
When using ViewStore you should take care to observe only the pieces of state that your view needs to do its job, especially towards the root of the application. See the performance article for more details:
0 commit comments