0.4.0
New in this Version
This version adds a new view TaskTriggerButton
which abstracts the whole TaskTrigger
logic further by being a drop-in replacement for a SwiftUI.Button
. The advantage is, that async actions can be run without wrapping them in a free-standing Task
:
TaskTriggerButton("Start Action") {
await someAsyncAction()
}
the above is equivalent to:
@State var trigger = PlainTaskTrigger()
var body: some View {
Button("Start Action") {
trigger.trigger()
}
.task($trigger) {
await someAsyncAction()
}
}
What's Changed
TaskTriggerButton
by @lukepistrol in #8
Full Changelog: 0.3.0...0.4.0