Hi, in this code it gives me the warning "Result of 'Text' initializer is unused" near Text("(Number)"). Does someone know what exactly mean this warning and how can I fix it?
Thanks in advance
struct NewView: View {
var body: some View {
Button {
tapped()
} label: {
Text("hello")
}
}
}
func tapped() {
Text("\(Number)")
}
struct NewView_Previews: PreviewProvider {
static var previews: some View {
NewView()
}
}