I've tried many different ways but none of them work, and im getting this error when I try to add .onChange
Instance method 'onChange(of:perform:)' requires that 'Binding<Int>' conform to 'Equatable'
I defined currentTab like this
@State var currentTab = 0;
This code gives the error
.onChange(of: $currentTab, perform: { newValue in
print(newValue)
})