Daily iOS
SwiftUIPelotoninterview report

Single state tally screen

A counter screen built in SwiftUI has increment, decrement, and reset buttons plus a display of the current value. How would you arrange the state so the displayed number can never disagree with the actual value after a button press?

Submit