0.50.0
What's Changed
-
Added:
@BindingState
(renamed from@BindableState
in this release) now conditionally conforms toSendable
(thanks @jshier, #1834). -
Added: SwiftUI Transaction helper APIs, including
Effect.transaction
,ViewStore.send(_:transaction:)
, andEffect.run { send in send(_:transaction:) }
(thanks @drucelweisse, #1824). -
Added:
Store.init
now takes aprepareDependencies
block, for preparing the initial dependencies of a store (TestStore
introduced a similar API earlier) (#1844). -
Added:
Effect.send
has been introduced as a new version ofEffect.init(value:)
(#1859).Effect.init(value:)
has been soft-deprecated and will be hard-deprecated soon, so prefer usingEffect.send
to synchronously feed actions back into the system. -
Changed: The
@BindableState
property wrapper has been renamed to@BindingState
(#1855). -
Changed:
TestStore
ergonomics have been improved to better surface when APIs are unavailable due to lack of anEquatable
conformance (#1857). -
Changed: Alert modifiers now use
@StateObject
instead of@ObservedObject
in iOS 15 and higher (#1860). -
Changed: Reducer builders have been rewritten to be more performant and to prepare for forthcoming Swift 5.8 changes (#1863). If you notice any regressions in your app's reducer builders, please let us know.
-
Changed: The Composable Architecture has been updated to depend on SwiftUI Navigation 0.6.0 (#1865).
Warning: This upgrade contains breaking changes that mostly do not affect the Composable Architecture, with the exception of its UIKit alert helper tools, which will now require you to handle a
nil
alert action for dismissal/cancel buttons with no action attached. -
Fixed: #1802 introduced a slight regression in view store binding animation behavior, so it was reverted back to the original behavior (#1845).
-
Fixed:
Effect
is now hard deprecated as planned (thanks @kalupas226, #1822). -
Fixed: The Composable Architecture now explicitly depends on Ordered Collections, rather than implicitly via its transitive dependency on Identified Collections (thanks @kalupas226, #1828).
-
Fixed:
TestStore.receive
methods that take predicates and case paths no longer requireAction
equatability (#1856). -
Infrastructure: Removed and updated a few deprecated, flakey tests (#1816).
-
Infrastructure: Added UI test to catch SwiftUI regressions (#1815; thanks @tgrapperon in #1819).
-
Infrastructure: Doc fixes (thanks @brennobemoura, #1843).
-
Infrastructure: Document testing gotchas (#1854).
New Contributors
- @jshier made their first contribution in #1834
- @brennobemoura made their first contribution in #1843
- @drucelweisse made their first contribution in #1824
Full Changelog: 0.49.2...0.50.0