So I have seen code like:
func doSomething() {
async {
let foo = await something()
}
}
vs
func doSomething() {
Task {
await doSomething()
}
}
There's also a modifier version of the Task:
TextView(...)
.task {
let foo = await something()
}
I am wondering what's the difference between these and which one should I use?