Result of 'Text' initializer is unused

Hello there, I'm trying to create a button with it initially written "hello", then when I click on the button I would like the 'hello' to become a number.

I already defined the variable (var Number = 1) and then I called Text("(Number)"). But when I recall the variable, ‘hello’ must change to number 1.

It gives me this warning "Result of 'Text' initializer is unused" near Text("(Number)") under the func tapped()... and the text doesn't change.

Here's my code:

var Number = 1

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()
    }
}
Result of 'Text' initializer is unused
 
 
Q