A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.
See Migrating to 1.8 for more details.
Added: New @Reducer
macro features (https://github.com/pointfreeco/swift-composable-architecture/pull/2795).
The @Reducer
macro has been enhanced to streamline usage and simplify some common patterns:
When left undefined, the @Reducer
will now define default implementations of State
, Action
, and body
. This means stubbing a feature is as simple as @Reducer struct Feature {}
.
@Reducer
can now be used with enums to simplify the boilerplate associated with "destination" and "path" reducers.
See the 1.8 migration guide for more information on how to use these APIs.
Fixed: Propagate @ViewAction
macro availability (https://github.com/pointfreeco/swift-composable-architecture/pull/2785).
Fixed: Properly tag nested observable enums so that changes to non-observable cases are better observed (https://github.com/pointfreeco/swift-composable-architecture/pull/2786).
Infrastructure: Fix typo in migration guide 1.6 (thanks @takehilo, https://github.com/pointfreeco/swift-composable-architecture/pull/2779); better document explicit id
with scoped ForEach
(https://github.com/pointfreeco/swift-composable-architecture/pull/2784); Fix typo in the 1.7 migration guide (thanks @yaslab, https://github.com/pointfreeco/swift-composable-architecture/pull/2780; thanks @Ryu0118, https://github.com/pointfreeco/swift-composable-architecture/pull/2790);
Full Changelog: https://github.com/pointfreeco/swift-composable-architecture/compare/1.7.2...1.8.0
Full Changelog: https://github.com/pointfreeco/swift-composable-architecture/compare/1.7.3...1.8.0
Full Changelog: https://github.com/pointfreeco/swift-composable-architecture/compare/1.7.2...1.7.3
Full Changelog: https://github.com/pointfreeco/swift-composable-architecture/compare/1.7.1...1.7.2
@ObservableState
now supports the package
access modifier (thanks @nnsnodnb, https://github.com/pointfreeco/swift-composable-architecture/pull/2741).Reducer.onChange(of:removeDuplicates:)
has been deprecated (https://github.com/pointfreeco/swift-composable-architecture/pull/2744). The removeDuplicates
argument put strain on the compiler that could cause reducers to not compile in time. Migration strategy: use an explicit wrapper type that is Equatable
, instead.Full Changelog: https://github.com/pointfreeco/swift-composable-architecture/compare/1.7.0...1.7.1
See Migrating to 1.7 for more details.
StackAction
's case path subscript (thanks @lukeredpath, https://github.com/pointfreeco/swift-composable-architecture/pull/2704).TestStore.assert
docs (https://github.com/pointfreeco/swift-composable-architecture/pull/2720).XCTExpectFailure
from XCTestDynamicOverlay
(https://github.com/pointfreeco/swift-composable-architecture/pull/2721).Full Changelog: https://github.com/pointfreeco/swift-composable-architecture/compare/1.6.0...1.7.0
See Migrating to 1.6 for more details.
TestStore.receive(\.action, payload)
for asserting against the payload of an action without requiring the action itself be Equatable
(https://github.com/pointfreeco/swift-composable-architecture/pull/2669; https://github.com/pointfreeco/swift-composable-architecture/pull/2691)ViewStore
s to ping their objectWillChange
publisher during a body computation, triggering a SwiftUI warning. This has been fixed (https://github.com/pointfreeco/swift-composable-architecture/pull/2688).@Reducer
macro no longer automatically applies @CasePathable
macro to enums with explicit conformance (thanks @scogeo, https://github.com/pointfreeco/swift-composable-architecture/pull/2685).prepareDependencies
closure is now only performed a single time when creating a store, not every single time an action is received (https://github.com/pointfreeco/swift-composable-architecture/pull/2695).PresentationModifier
has been fixed (https://github.com/pointfreeco/swift-composable-architecture/pull/2697).Full Changelog: https://github.com/pointfreeco/swift-composable-architecture/compare/1.5.6...1.6.0
[!IMPORTANT] While this release contains no additions or breaking changes to the Composable Architecture's APIs, the
Store.scope
operation has been significantly refactored for performance. While we have vetted these changes in our own test suites and applications, and have worked with members of the community to test these changes before this release, please thoroughly test the view layer of your applications after upgrading to this version, and before releasing your application to production.See #2664 for more details on the change.
@DependencyClient
macro (https://github.com/pointfreeco/swift-composable-architecture/pull/2653).@CasePathable
to enums (https://github.com/pointfreeco/swift-composable-architecture/pull/2672).Full Changelog: https://github.com/pointfreeco/swift-composable-architecture/compare/1.5.5...1.5.6
Full Changelog: https://github.com/pointfreeco/swift-composable-architecture/compare/1.5.4...1.5.5
BindableAction
symbols (thanks @rhysm94, https://github.com/pointfreeco/swift-composable-architecture/pull/2641).Full Changelog: https://github.com/pointfreeco/swift-composable-architecture/compare/1.5.3...1.5.4
IfLetStore
views.Full Changelog: https://github.com/pointfreeco/swift-composable-architecture/compare/1.5.2...1.5.3