1.4.0 - Concurrency
Swift Concurrency on board!
We have been working for a long time on preparing a huge release with many changes, optimizations and upgrades to the SwiftUI-UDF Architecture.
And now, UDF architecture has got concurrency support for the Middleware layer!
What was done:
- Store is getting smarter and smarter and becomes an Actor to guarantee and sync state mutations and accesses;
- Middleware layer got separation on BaseMiddleware (Combine version) and BaseConcurrencyMiddleware (Swift Concurrency) with separation on Observable/Reducible;
- All types of middlewares got the
Environment
to describe dependencies and build them in thebuildLiveEnvironment
andbuildTestEnvironment
methods; - Container got a new re-rendering system to control which part of the State mutation would cause a re-rendering. The scope of work;
func scope(for state: SourceOfTruth<ContainerState>) -> Scope
- Animations support. Since now we can add animation modifier for Action use withAnimation function;
Actions.SomeAction().withAnimation(.linear)
- Silent action. We have added the option to dispatch an action without logging to the loggers. Use silent function, such action won't be logged to loggers.
- New logging system.
ActionLogger
,ActionFilter
,ActionDescriptor
to be able to dynamically add any loggers (Console, Crashlytics, Files, etc). InitialSetup
protocol. If some reducer needs the State for initial setup.
func initialSetup(with state: State)
- XCTestStore is MainActor since now.
And of course 100500 improvements and minor updates.
Keep Coding!
Full Changelog: 1.3.x...1.4.x