Skip to content

0.4.0

Compare
Choose a tag to compare
@lukepistrol lukepistrol released this 26 Nov 11:55
· 2 commits to main since this release
c489972

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.3.0...0.4.0