Skip to content

0.4.1

Latest
Compare
Choose a tag to compare
@lukepistrol lukepistrol released this 26 Nov 22:38
0653d6f

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

Full Changelog: 0.4.0...0.4.1