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/Internal/Deprecations.swift
+18-8Lines changed: 18 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,11 @@ import SwiftUI
6
6
7
7
#if compiler(>=5.4)
8
8
extensionBindingAction{
9
-
@available(*, deprecated, message:"Values are now wrapped in 'BindableState'")
9
+
@available(
10
+
*, deprecated,
11
+
message:
12
+
"For improved safety, bindable properties must now be wrapped explicitly in 'BindableState', and accessed via key paths to that 'BindableState', like '\\.$value'"
13
+
)
10
14
publicstaticfunc set<Value>(
11
15
_ keyPath:WritableKeyPath<Root,Value>,
12
16
_ value:Value
@@ -20,7 +24,11 @@ import SwiftUI
20
24
)
21
25
}
22
26
23
-
@available(*, deprecated, message:"Values are now wrapped in 'BindableState'")
27
+
@available(
28
+
*, deprecated,
29
+
message:
30
+
"For improved safety, bindable properties must now be wrapped explicitly in 'BindableState', and accessed via key paths to that 'BindableState', like '\\.$value'"
31
+
)
24
32
publicstaticfunc~=<Value>(
25
33
keyPath:WritableKeyPath<Root,Value>,
26
34
bindingAction:Self
@@ -33,7 +41,7 @@ import SwiftUI
33
41
@available(
34
42
*, deprecated,
35
43
message:
36
-
"'Reducer.binding()' no longer takes an explicit extract function and instead relies on 'BindableAction'"
44
+
"'Reducer.binding()' no longer takes an explicit extract function and instead the reducer's 'Action' type must conform to 'BindableAction'"
*, deprecated, message:"Bindings are now derived using 'BindableState' and 'BindableAction'"
57
+
*, deprecated,
58
+
message:
59
+
"For improved safety, bindable properties must now be wrapped explicitly in 'BindableState'. Bindings are now derived via dynamic member lookup to that 'BindableState' (for example, 'viewStore.$value'). For dynamic member lookup to be available, the view store's 'Action' type must also conform to 'BindableAction'."
50
60
)
51
61
publicfunc binding<LocalState>(
52
62
keyPath:WritableKeyPath<State,LocalState>,
@@ -64,7 +74,7 @@ import SwiftUI
64
74
@available(
65
75
*, deprecated,
66
76
message:
67
-
"Values are now wrapped in 'BindableState'. Upgrade to Xcode 12.5 or greater for access to 'BindableState'."
77
+
"For improved safety, bindable properties must now be wrapped explicitly in 'BindableState', and accessed via key paths to that 'BindableState', like '\\.$value'. Upgrade to Xcode 12.5 or greater for access to 'BindableState'."
68
78
)
69
79
publicstaticfunc set<Value>(
70
80
_ keyPath:WritableKeyPath<Root,Value>,
@@ -82,7 +92,7 @@ import SwiftUI
82
92
@available(
83
93
*, deprecated,
84
94
message:
85
-
"Values are now wrapped in 'BindableState'. Upgrade to Xcode 12.5 or greater for access to 'BindableState'."
95
+
"For improved safety, bindable properties must now be wrapped explicitly in 'BindableState', and accessed via key paths to that 'BindableState', like '\\.$value'. Upgrade to Xcode 12.5 or greater for access to 'BindableState'."
86
96
)
87
97
publicstaticfunc~=<Value>(
88
98
keyPath:WritableKeyPath<Root,Value>,
@@ -96,7 +106,7 @@ import SwiftUI
96
106
@available(
97
107
*, deprecated,
98
108
message:
99
-
"'Reducer.binding()' no longer takes an explicit extract function and instead relies on 'BindableAction'. Upgrade to Xcode 12.5 or greater for access to 'Reducer.binding()' and 'BindableAction'."
109
+
"'Reducer.binding()' no longer takes an explicit extract function and instead the reducer's 'Action' type must conform to 'BindableAction'. Upgrade to Xcode 12.5 or greater for access to 'Reducer.binding()' and 'BindableAction'."
"Bindings are now derived using 'BindableState' and 'BindableAction'. Upgrade to Xcode 12.5 or greater for access to 'BindableState' and 'BindableAction'."
124
+
"For improved safety, bindable properties must now be wrapped explicitly in 'BindableState'. Bindings are now derived via dynamic member lookup to that 'BindableState' (for example, 'viewStore.$value'). For dynamic member lookup to be available, the view store's 'Action' type must also conform to 'BindableAction'. Upgrade to Xcode 12.5 or greater for access to 'BindableState' and 'BindableAction'."
0 commit comments