A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.
StackActionOf<R>
type alias (thanks @d-date, https://github.com/pointfreeco/swift-composable-architecture/pull/2906).TestStore
autocompletion (https://github.com/pointfreeco/swift-composable-architecture/pull/2923).package
access modifier support in enum @Reducer
macro (thanks @samrayner, https://github.com/pointfreeco/swift-composable-architecture/pull/2939).Effect.publisher
is no longer escaping (https://github.com/pointfreeco/swift-composable-architecture/pull/2968).observe
(https://github.com/pointfreeco/swift-composable-architecture/pull/2996).Full Changelog: https://github.com/pointfreeco/swift-composable-architecture/compare/1.9.2...1.9.3
BindableAction
dynamic case lookup added in 1.9 led to a regression in compile time performance that could break downstream builds. This has been reverted (https://github.com/pointfreeco/swift-composable-architecture/pull/2886).Full Changelog: https://github.com/pointfreeco/swift-composable-architecture/compare/1.9.1...1.9.2
Full Changelog: https://github.com/pointfreeco/swift-composable-architecture/compare/1.9.0...1.9.1
See Migrating to 1.9 for more details.
TestStore.send
that accept case key paths (thanks @scogeo, https://github.com/pointfreeco/swift-composable-architecture/pull/2681; https://github.com/pointfreeco/swift-composable-architecture/pull/2868).Reducer.dependency(value)
, for overriding a reducer's dependency using a singleton value of a type (https://github.com/pointfreeco/swift-composable-architecture/pull/2863).Store
diagnostics for deriving bindings (https://github.com/pointfreeco/swift-composable-architecture/pull/2793).ViewStore
s are initialized in a view that doesn't use WithPerceptionTracking
(https://github.com/pointfreeco/swift-composable-architecture/pull/2849).#if
branching in @ObservableState
and enum @Reducer
s (https://github.com/pointfreeco/swift-composable-architecture/pull/2800).Full Changelog: https://github.com/pointfreeco/swift-composable-architecture/compare/1.8.2...1.9.0
Full Changelog: https://github.com/pointfreeco/swift-composable-architecture/compare/1.8.1...1.8.2
@Reducer(state: .equatable)
in the migration guide https://github.com/pointfreeco/swift-composable-architecture/pull/2796
Full Changelog: https://github.com/pointfreeco/swift-composable-architecture/compare/1.8.0...1.8.1
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