In tutorial I was watching someone created a button with SwiftUI in Xcode,
and it looked like something like this:
Button(action: {
print("something")
}) {
Text("Send")
}
If I drag and drop "button" option in Xcode, it creates something like this:
Button("Send") {
print("something")
}
I find it confusing that you can kind of do it in 2 ways.
Is the first one used most of the time?