Releases: Khizanag/MVIKit
Releases · Khizanag/MVIKit
Release list
MVIKit 1.0.1
A bug-fix release. Upgrading is recommended for every app that uses MVIKit.
Fixed
- A cancelled effect could still deliver one stale intent.
Sendchecked for cancellation before hopping to the main actor. If the effect was cancelled between that check and the hop, the intent still reached the reducer. For example, a new keystroke arriving while a search response was being delivered could leave the old results on screen. The check now runs on the main actor, immediately before delivery, so an intent from a cancelled effect is always dropped.
A regression test in SendTests holds the main actor while the effect reaches send, cancels, and asserts the intent never lands. It fails on 1.0.0 and passes on 1.0.1.
No API changes.
.package(url: "https://github.com/Khizanag/MVIKit", from: "1.0.1")MVIKit 1.0.0
The first standalone release of MVIKit: Model-View-Intent for SwiftUI in about 270 lines, with zero dependencies.
What's inside
Reducer: the pure state machine,(inout State, Intent) -> Effect<Intent>Effect: async work as data,.run(id:_:),.cancel(_:),.merge(_:), with switch-latest cancellation byEffectIDSend: the only channel from an effect back into the loop. It drops intents after cancellationStore: the@Observableloop driver, withbinding(_:send:)andsettle()for.refreshableand testsLoadingPhase:idle,loading,loaded,failedwith a typed failure
Requirements
- Swift 6.2 or later (Xcode 26 or later)
- iOS 17, macOS 14, tvOS 17, watchOS 10, visionOS 1
Installation
.package(url: "https://github.com/Khizanag/MVIKit", from: "1.0.0")Extracted from Cinematic, the reference app built on it, with the full commit history kept.