Closed skyfe79 closed 2 years ago
Add commit(mutation:) which has no payload parameter. We can reduce the codes to define store's action like below:
Button(action: { store.counter.incrementAction(payload: 1) }) { Text(" + ") .font(.title) .bold() }
to be
Button(action: { store.counter.commit { $0.count += 1 }) { Text(" + ") .font(.title) .bold() }
Summary
Add commit(mutation:) which has no payload parameter. We can reduce the codes to define store's action like below:
to be
Changed